From b7df4bf849cda311467dece94c43c13a4c3e7196 Mon Sep 17 00:00:00 2001 From: Diederik de Haas Date: Thu, 3 Nov 2022 21:47:29 +0100 Subject: [PATCH 1/5] Move .gitlab-ci.yml to debian/salsa-ci.yml This seems to be the standard location for Salsa's CI. --- .gitlab-ci.yml => debian/salsa-ci.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .gitlab-ci.yml => debian/salsa-ci.yml (100%) diff --git a/.gitlab-ci.yml b/debian/salsa-ci.yml similarity index 100% rename from .gitlab-ci.yml rename to debian/salsa-ci.yml From 5e42c6360ad7dd26d028557432c08c92a46de230 Mon Sep 17 00:00:00 2001 From: Diederik de Haas Date: Thu, 3 Nov 2022 21:54:38 +0100 Subject: [PATCH 2/5] Move some lines to other position in the file It's common to define variables/constants in the top of a file, so do that here too. Move 'stage' field directly under step name as it's quite significant and seen in other salsa-ci.yml as well. Move 'image' line after 'stage' line as it's quite important as well. --- debian/salsa-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml index d30f82c..cd07cb5 100644 --- a/debian/salsa-ci.yml +++ b/debian/salsa-ci.yml @@ -1,7 +1,12 @@ stages: - build +variables: + DEBIAN_FRONTEND: "noninteractive" + build: + stage: build + image: debian:sid retry: max: 2 when: always @@ -9,8 +14,6 @@ build: - branches - master # I suppose that we can work directly on master - merge_request - stage: build - image: debian:sid dependencies: [] script: - apt-get update && apt-get install -y vmdb2 dosfstools qemu-utils qemu-user-static debootstrap binfmt-support time kpartx bmap-tools python3 fakemachine make @@ -21,6 +24,3 @@ build: paths: - build -variables: - DEBIAN_FRONTEND: "noninteractive" - From ad77890ede7b484594d86b70885f595ca7dd66c4 Mon Sep 17 00:00:00 2001 From: Diederik de Haas Date: Thu, 3 Nov 2022 21:55:32 +0100 Subject: [PATCH 3/5] Switch to using images maintained by salsa ci team Debian's Salsa team has their own registry of images they maintain, so use them instead of ones maintained by gitlab. At https://salsa.debian.org/salsa-ci-team/pipeline/container_registry one can view the various images they maintain. Switch to using 'unstable' instead of 'sid'. The idea is to later also add steps based on 'stable' and then 'unstable' matches better. --- debian/salsa-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml index cd07cb5..e7ace6e 100644 --- a/debian/salsa-ci.yml +++ b/debian/salsa-ci.yml @@ -3,10 +3,13 @@ stages: variables: DEBIAN_FRONTEND: "noninteractive" + # At https://salsa.debian.org/salsa-ci-team/pipeline/container_registry one can see which images are available + SALSA_CI_IMAGES: registry.salsa.debian.org/salsa-ci-team/pipeline + BASE_CI_IMAGES: ${SALSA_CI_IMAGES}/base build: stage: build - image: debian:sid + image: $BASE_CI_IMAGES:unstable retry: max: 2 when: always From 8b06d1492563196e66c10e0d706550f0f1802feb Mon Sep 17 00:00:00 2001 From: Diederik de Haas Date: Thu, 3 Nov 2022 23:39:30 +0100 Subject: [PATCH 4/5] Rename 'build' job to 'build-yamls' This is more describtive and also to distinguish from the build stage. --- debian/salsa-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml index e7ace6e..2ba75f0 100644 --- a/debian/salsa-ci.yml +++ b/debian/salsa-ci.yml @@ -7,7 +7,7 @@ variables: SALSA_CI_IMAGES: registry.salsa.debian.org/salsa-ci-team/pipeline BASE_CI_IMAGES: ${SALSA_CI_IMAGES}/base -build: +build-yamls: stage: build image: $BASE_CI_IMAGES:unstable retry: From 02567af307f662cb06c903066466188682d9ff3c Mon Sep 17 00:00:00 2001 From: Diederik de Haas Date: Fri, 4 Nov 2022 13:28:57 +0100 Subject: [PATCH 5/5] Don't retry on failure As we're just starting out using CI, it is especially important to be aware of any failure, so that we can fix it. Such a workaround can be added later in case it is deemed necessary. --- debian/salsa-ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml index 2ba75f0..de30ee1 100644 --- a/debian/salsa-ci.yml +++ b/debian/salsa-ci.yml @@ -10,9 +10,6 @@ variables: build-yamls: stage: build image: $BASE_CI_IMAGES:unstable - retry: - max: 2 - when: always only: - branches - master # I suppose that we can work directly on master