From 63d28ee7d8bd6ef71125407d138ee28ce4d92d35 Mon Sep 17 00:00:00 2001 From: Mathis Kelm <mathis.kelm@iws.uni-stuttgart.de> Date: Thu, 27 Jun 2024 10:40:10 +0200 Subject: [PATCH 01/22] [ci] add version for ubuntu version, can be passed from dumux --- .gitlab-ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fb98b41..0d7d989 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,12 +9,13 @@ variables: DUMUX_DOCKER_CI_BRANCH: master IMAGE_REGISTRY_URL: $CI_REGISTRY/dumux-repositories/dumux-docker-ci DUMUX_CI_DUNE_LATEST_RELEASE: "2.9" + UBUNTU_VERSION: "22.04" # for commits happening on master, we check if there was a successful # pipeline on a related merge request already. If yes, we simply return # to propagate that pipeline status on master. Otherwise, we trigger a new run. check-pipeline-status: - image: $IMAGE_REGISTRY_URL/${DUMUX_DOCKER_CI_BRANCH}_full:dune-2.9-gcc-ubuntu-22.04 + image: $IMAGE_REGISTRY_URL/${DUMUX_DOCKER_CI_BRANCH}_full:dune-2.9-gcc-ubuntu-$UBUNTU_VERSION stage: check-status rules: - if: $CI_PIPELINE_SOURCE == "schedule" @@ -73,6 +74,9 @@ check-pipeline-status: - if: $DUMUX_DOCKER_BRANCH != null variables: DUMUX_DOCKER_CI_BRANCH: $DUMUX_DOCKER_BRANCH + - if: $DUMUX_UBUNTU_VERSION != null + variables: + UBUNTU_VERIONS: $DUMUX_UBUNTU_VERSION - if: $CI_PIPELINE_SOURCE == "pipeline" when: always - if: $CI_PIPELINE_SOURCE == "merge_request_event" @@ -90,4 +94,4 @@ full-dune-latest-release-gcc: extends: .default-trigger variables: IMAGE_NAME: "${DUMUX_DOCKER_CI_BRANCH}_full" - IMAGE: "$IMAGE_REGISTRY_URL/$IMAGE_NAME:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-22.04" + IMAGE: "$IMAGE_REGISTRY_URL/$IMAGE_NAME:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" -- GitLab From 80d0163a37b7a56cfc96f390d9ed7c20787700de Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 09:04:44 +0000 Subject: [PATCH 02/22] fix ubuntu version type --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0d7d989..8b81163 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -76,7 +76,7 @@ check-pipeline-status: DUMUX_DOCKER_CI_BRANCH: $DUMUX_DOCKER_BRANCH - if: $DUMUX_UBUNTU_VERSION != null variables: - UBUNTU_VERIONS: $DUMUX_UBUNTU_VERSION + UBUNTU_VERSION: $DUMUX_UBUNTU_VERSION - if: $CI_PIPELINE_SOURCE == "pipeline" when: always - if: $CI_PIPELINE_SOURCE == "merge_request_event" -- GitLab From e6a6d71cd364abeb3ac08ff56bdb70d73208d363 Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 12:36:57 +0000 Subject: [PATCH 03/22] Test new approach for dynamic varibales --- .gitlab-ci.yml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8b81163..a679cbf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ stages: - check-status + - set-variables-job - trigger pipelines variables: @@ -59,6 +60,27 @@ check-pipeline-status: else echo "Found successful pipeline for the current state of the branch. Not testing again." fi +set-variables-job: + stage: set-variables-job + script: + - | + # Set DUMUX_DOCKER_CI_BRANCH and UBUNTU_VERSION based on existing variables + DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} + UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} + IMAGE_NAME: "${DUMUX_DOCKER_CI_BRANCH}_full" + + # Create the IMAGE variable + IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" + + # Export variables to a dynamic configuration file + echo "variables:" > dynamic-variables.yml + echo " IMAGE: $IMAGE" >> dynamic-variables.yml + echo " DUMUX_DOCKER_CI_BRANCH: $DUMUX_DOCKER_CI_BRANCH" >> dynamic-variables.yml + echo " UBUNTU_VERSION: $UBUNTU_VERSION" >> dynamic-variables.yml + - cat dynamic-variables.yml + artifacts: + reports: + dotenv: dynamic_variables.env # rules for the default triggers: # - pipelines are triggered for merge requests and external triggers (e.g. nightly build in dumux) @@ -71,12 +93,6 @@ check-pipeline-status: - local: .gitlab-ci/default.yml strategy: depend rules: - - if: $DUMUX_DOCKER_BRANCH != null - variables: - DUMUX_DOCKER_CI_BRANCH: $DUMUX_DOCKER_BRANCH - - if: $DUMUX_UBUNTU_VERSION != null - variables: - UBUNTU_VERSION: $DUMUX_UBUNTU_VERSION - if: $CI_PIPELINE_SOURCE == "pipeline" when: always - if: $CI_PIPELINE_SOURCE == "merge_request_event" @@ -90,8 +106,8 @@ check-pipeline-status: DUMUX_TRIGGER_REF_SHA: $DUMUX_REFERENCE_SHA LECTURE_CI_REFERENCE_SHA: $CI_REFERENCE_SHA + full-dune-latest-release-gcc: extends: .default-trigger variables: - IMAGE_NAME: "${DUMUX_DOCKER_CI_BRANCH}_full" - IMAGE: "$IMAGE_REGISTRY_URL/$IMAGE_NAME:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" + IMAGE: $IMAGE -- GitLab From 668dd99ee40f6a8e313a4633fd89ad775e6ac3cc Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 12:41:56 +0000 Subject: [PATCH 04/22] try different script section --- .gitlab-ci.yml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a679cbf..0d1c7d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,21 +63,13 @@ check-pipeline-status: set-variables-job: stage: set-variables-job script: - - | - # Set DUMUX_DOCKER_CI_BRANCH and UBUNTU_VERSION based on existing variables - DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} - UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} - IMAGE_NAME: "${DUMUX_DOCKER_CI_BRANCH}_full" - - # Create the IMAGE variable - IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" - - # Export variables to a dynamic configuration file - echo "variables:" > dynamic-variables.yml - echo " IMAGE: $IMAGE" >> dynamic-variables.yml - echo " DUMUX_DOCKER_CI_BRANCH: $DUMUX_DOCKER_CI_BRANCH" >> dynamic-variables.yml - echo " UBUNTU_VERSION: $UBUNTU_VERSION" >> dynamic-variables.yml - - cat dynamic-variables.yml + - DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} + - UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} + - IMAGE_NAME= "${DUMUX_DOCKER_CI_BRANCH}_full" + - IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" + - echo "IMAGE: $IMAGE" >> dynamic-variables.yml + - echo "DUMUX_DOCKER_CI_BRANCH: $DUMUX_DOCKER_CI_BRANCH" >> dynamic-variables.yml + - echo "UBUNTU_VERSION: $UBUNTU_VERSION" >> dynamic-variables.yml artifacts: reports: dotenv: dynamic_variables.env -- GitLab From da395e011429fa8d1a7a44b07b1bc6d50feef826 Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 12:43:57 +0000 Subject: [PATCH 05/22] fix syntax error --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0d1c7d3..19e9f24 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -65,11 +65,11 @@ set-variables-job: script: - DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} - UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} - - IMAGE_NAME= "${DUMUX_DOCKER_CI_BRANCH}_full" + - IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" - IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" - - echo "IMAGE: $IMAGE" >> dynamic-variables.yml - - echo "DUMUX_DOCKER_CI_BRANCH: $DUMUX_DOCKER_CI_BRANCH" >> dynamic-variables.yml - - echo "UBUNTU_VERSION: $UBUNTU_VERSION" >> dynamic-variables.yml + - echo "IMAGE:$IMAGE" >> dynamic-variables.yml + - echo "DUMUX_DOCKER_CI_BRANCH:$DUMUX_DOCKER_CI_BRANCH" >> dynamic-variables.yml + - echo "UBUNTU_VERSION:$UBUNTU_VERSION" >> dynamic-variables.yml artifacts: reports: dotenv: dynamic_variables.env -- GitLab From e4021c761dc7732d13bdcbedfd5cd097d3ba9f8c Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 12:49:27 +0000 Subject: [PATCH 06/22] fix typo --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 19e9f24..d889b3e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,9 +67,9 @@ set-variables-job: - UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} - IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" - IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" - - echo "IMAGE:$IMAGE" >> dynamic-variables.yml - - echo "DUMUX_DOCKER_CI_BRANCH:$DUMUX_DOCKER_CI_BRANCH" >> dynamic-variables.yml - - echo "UBUNTU_VERSION:$UBUNTU_VERSION" >> dynamic-variables.yml + - echo "IMAGE:$IMAGE" >> dynamic-variables.env + - echo "DUMUX_DOCKER_CI_BRANCH:$DUMUX_DOCKER_CI_BRANCH" >> dynamic-variables.env + - echo "UBUNTU_VERSION:$UBUNTU_VERSION" >> dynamic-variables.env artifacts: reports: dotenv: dynamic_variables.env -- GitLab From c8c5f628823be211007041c8e7f2d40fd9e482d8 Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 12:52:38 +0000 Subject: [PATCH 07/22] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d889b3e..c605ac9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,6 +61,7 @@ check-pipeline-status: echo "Found successful pipeline for the current state of the branch. Not testing again." fi set-variables-job: + image: alpine-latest stage: set-variables-job script: - DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} -- GitLab From 571af48b006929ee2eb9a2a8d32e95e6c1476d9c Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 12:57:36 +0000 Subject: [PATCH 08/22] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c605ac9..499defd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,6 @@ stages: - check-status - - set-variables-job - trigger pipelines variables: @@ -59,11 +58,7 @@ check-pipeline-status: "https://git.iws.uni-stuttgart.de/api/v4/projects/33/trigger/pipeline" else echo "Found successful pipeline for the current state of the branch. Not testing again." - fi -set-variables-job: - image: alpine-latest - stage: set-variables-job - script: + fi - DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} - UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} - IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" @@ -75,6 +70,8 @@ set-variables-job: reports: dotenv: dynamic_variables.env + + # rules for the default triggers: # - pipelines are triggered for merge requests and external triggers (e.g. nightly build in dumux) # - Within merge requests, we require to start the pipeline manually by clicking play for the trigger -- GitLab From a9f73e842a639862ce7c3b1c73ee6e2c1f183bbd Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 13:08:34 +0000 Subject: [PATCH 09/22] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 499defd..d644345 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ stages: - check-status + - variables_parser - trigger pipelines variables: @@ -59,6 +60,12 @@ check-pipeline-status: else echo "Found successful pipeline for the current state of the branch. Not testing again." fi + + +variables_parse_job: + image: $IMAGE_REGISTRY_URL/${DUMUX_DOCKER_CI_BRANCH}_full:dune-2.9-gcc-ubuntu-$UBUNTU_VERSION + stage: variables_parser + script: - DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} - UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} - IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" @@ -70,8 +77,6 @@ check-pipeline-status: reports: dotenv: dynamic_variables.env - - # rules for the default triggers: # - pipelines are triggered for merge requests and external triggers (e.g. nightly build in dumux) # - Within merge requests, we require to start the pipeline manually by clicking play for the trigger -- GitLab From 7d9c5456a3d8a51957af41e333c1944ebbcd1256 Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 13:11:32 +0000 Subject: [PATCH 10/22] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d644345..03672e9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -75,7 +75,7 @@ variables_parse_job: - echo "UBUNTU_VERSION:$UBUNTU_VERSION" >> dynamic-variables.env artifacts: reports: - dotenv: dynamic_variables.env + dotenv: dynamic-variables.env # rules for the default triggers: # - pipelines are triggered for merge requests and external triggers (e.g. nightly build in dumux) -- GitLab From 823428bda72fd255e756f58b41ed0e00fd9f0a01 Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 13:14:16 +0000 Subject: [PATCH 11/22] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 03672e9..5a42c30 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -71,8 +71,6 @@ variables_parse_job: - IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" - IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" - echo "IMAGE:$IMAGE" >> dynamic-variables.env - - echo "DUMUX_DOCKER_CI_BRANCH:$DUMUX_DOCKER_CI_BRANCH" >> dynamic-variables.env - - echo "UBUNTU_VERSION:$UBUNTU_VERSION" >> dynamic-variables.env artifacts: reports: dotenv: dynamic-variables.env -- GitLab From 4979fc3dbc7634a8093957dc50f8c5e6b55ce5de Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 13:15:34 +0000 Subject: [PATCH 12/22] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a42c30..5680eb1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -70,7 +70,7 @@ variables_parse_job: - UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} - IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" - IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" - - echo "IMAGE:$IMAGE" >> dynamic-variables.env + - echo "IMAGE=$IMAGE" >> dynamic-variables.env artifacts: reports: dotenv: dynamic-variables.env -- GitLab From cd9aac5b3c1ac86586a33a0c6a171cea41a3118a Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 13:26:56 +0000 Subject: [PATCH 13/22] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5680eb1..1dfab46 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,15 +2,28 @@ # SPDX-License-Identifier: GPL-3.0-or-later stages: - - check-status - variables_parser + - check-status - trigger pipelines variables: - DUMUX_DOCKER_CI_BRANCH: master IMAGE_REGISTRY_URL: $CI_REGISTRY/dumux-repositories/dumux-docker-ci DUMUX_CI_DUNE_LATEST_RELEASE: "2.9" - UBUNTU_VERSION: "22.04" + +variables_parse_job: + image: $IMAGE_REGISTRY_URL/${DUMUX_DOCKER_CI_BRANCH}_full:dune-2.9-gcc-ubuntu-$UBUNTU_VERSION + stage: variables_parser + script: + - DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} + - UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} + - IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" + - IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" + - echo "IMAGE=$IMAGE" >> dynamic-variables.env + - echo "UBUNTU_VERSION=$UBUNTU_VERSION" >> dynamic-variables.env + - echo "DUMUX_DOCKER_CI_BRANCH" >> dynamic-variables.env + artifacts: + reports: + dotenv: dynamic-variables.env # for commits happening on master, we check if there was a successful # pipeline on a related merge request already. If yes, we simply return @@ -62,18 +75,7 @@ check-pipeline-status: fi -variables_parse_job: - image: $IMAGE_REGISTRY_URL/${DUMUX_DOCKER_CI_BRANCH}_full:dune-2.9-gcc-ubuntu-$UBUNTU_VERSION - stage: variables_parser - script: - - DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} - - UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} - - IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" - - IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" - - echo "IMAGE=$IMAGE" >> dynamic-variables.env - artifacts: - reports: - dotenv: dynamic-variables.env + # rules for the default triggers: # - pipelines are triggered for merge requests and external triggers (e.g. nightly build in dumux) -- GitLab From e0a0723ee08c03fc58fc31c94653e80d554d04de Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 13:30:51 +0000 Subject: [PATCH 14/22] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1dfab46..3671994 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,10 +14,10 @@ variables_parse_job: image: $IMAGE_REGISTRY_URL/${DUMUX_DOCKER_CI_BRANCH}_full:dune-2.9-gcc-ubuntu-$UBUNTU_VERSION stage: variables_parser script: - - DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} - - UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} - - IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" - - IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" + - export DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} + - export UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} + - export IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" + - export IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" - echo "IMAGE=$IMAGE" >> dynamic-variables.env - echo "UBUNTU_VERSION=$UBUNTU_VERSION" >> dynamic-variables.env - echo "DUMUX_DOCKER_CI_BRANCH" >> dynamic-variables.env -- GitLab From d318859dee88f1f81076d33ee4a0d1ac528c96ee Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 13:34:05 +0000 Subject: [PATCH 15/22] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3671994..b018b75 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ variables: DUMUX_CI_DUNE_LATEST_RELEASE: "2.9" variables_parse_job: - image: $IMAGE_REGISTRY_URL/${DUMUX_DOCKER_CI_BRANCH}_full:dune-2.9-gcc-ubuntu-$UBUNTU_VERSION + image: $IMAGE_REGISTRY_URL/master_full:dune-2.9-gcc-ubuntu-22.04 stage: variables_parser script: - export DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} -- GitLab From 74b251e9de94f56812287432a2f5f6f0eccd1f0f Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 13:38:07 +0000 Subject: [PATCH 16/22] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b018b75..99654b0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,10 +14,10 @@ variables_parse_job: image: $IMAGE_REGISTRY_URL/master_full:dune-2.9-gcc-ubuntu-22.04 stage: variables_parser script: - - export DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} - - export UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} - - export IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" - - export IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" + - DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} + - UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} + - IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" + - IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" - echo "IMAGE=$IMAGE" >> dynamic-variables.env - echo "UBUNTU_VERSION=$UBUNTU_VERSION" >> dynamic-variables.env - echo "DUMUX_DOCKER_CI_BRANCH" >> dynamic-variables.env -- GitLab From a567618448949a5c30ce0cf5fb90850c24052a0a Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 13:39:34 +0000 Subject: [PATCH 17/22] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 99654b0..048a87a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,7 +20,7 @@ variables_parse_job: - IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" - echo "IMAGE=$IMAGE" >> dynamic-variables.env - echo "UBUNTU_VERSION=$UBUNTU_VERSION" >> dynamic-variables.env - - echo "DUMUX_DOCKER_CI_BRANCH" >> dynamic-variables.env + - echo "DUMUX_DOCKER_CI_BRANCH=$DUMUX_DOCKER_CI_BRANCH" >> dynamic-variables.env artifacts: reports: dotenv: dynamic-variables.env -- GitLab From bbe87557928e92a9c8817c4ee3165f5ba7ef8287 Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 13:48:34 +0000 Subject: [PATCH 18/22] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 048a87a..dd0bee6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,6 +13,11 @@ variables: variables_parse_job: image: $IMAGE_REGISTRY_URL/master_full:dune-2.9-gcc-ubuntu-22.04 stage: variables_parser + rules: + - if: $CI_PIPELINE_SOURCE == "pipeline" + when: always + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + when: always script: - DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} - UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} -- GitLab From ab1e60380b512d7b1357a138b49d4786022f9d3e Mon Sep 17 00:00:00 2001 From: Mathis Kelm <mathis.kelm@iws.uni-stuttgart.de> Date: Thu, 27 Jun 2024 14:01:57 +0000 Subject: [PATCH 19/22] [ci] cleanup output of variables parsing --- .gitlab-ci.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dd0bee6..985c9b0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-3.0-or-later stages: - - variables_parser + - variables-parser - check-status - trigger pipelines @@ -10,22 +10,23 @@ variables: IMAGE_REGISTRY_URL: $CI_REGISTRY/dumux-repositories/dumux-docker-ci DUMUX_CI_DUNE_LATEST_RELEASE: "2.9" -variables_parse_job: +variables-parse-job: image: $IMAGE_REGISTRY_URL/master_full:dune-2.9-gcc-ubuntu-22.04 - stage: variables_parser + stage: variables-parser rules: - if: $CI_PIPELINE_SOURCE == "pipeline" when: always - if: $CI_PIPELINE_SOURCE == "merge_request_event" when: always script: - - DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} - - UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} - - IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" - - IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" - - echo "IMAGE=$IMAGE" >> dynamic-variables.env - - echo "UBUNTU_VERSION=$UBUNTU_VERSION" >> dynamic-variables.env - - echo "DUMUX_DOCKER_CI_BRANCH=$DUMUX_DOCKER_CI_BRANCH" >> dynamic-variables.env + - | + DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} + UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} + IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" + IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" + echo "IMAGE=$IMAGE" | tee -a dynamic-variables.env + echo "UBUNTU_VERSION=$UBUNTU_VERSION" | tee -a dynamic-variables.env + echo "DUMUX_DOCKER_CI_BRANCH=$DUMUX_DOCKER_CI_BRANCH" | tee -a dynamic-variables.env artifacts: reports: dotenv: dynamic-variables.env -- GitLab From dc740b88f7f8da38eb3c4f0079ee32da54594b1d Mon Sep 17 00:00:00 2001 From: Leon Keim <leon.keim@googlemail.com> Date: Thu, 27 Jun 2024 15:58:52 +0000 Subject: [PATCH 20/22] use lightweight alpine image for processing stages --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 985c9b0..9953e29 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ variables: DUMUX_CI_DUNE_LATEST_RELEASE: "2.9" variables-parse-job: - image: $IMAGE_REGISTRY_URL/master_full:dune-2.9-gcc-ubuntu-22.04 + image: $IMAGE_REGISTRY_URL/alpine stage: variables-parser rules: - if: $CI_PIPELINE_SOURCE == "pipeline" @@ -35,7 +35,7 @@ variables-parse-job: # pipeline on a related merge request already. If yes, we simply return # to propagate that pipeline status on master. Otherwise, we trigger a new run. check-pipeline-status: - image: $IMAGE_REGISTRY_URL/${DUMUX_DOCKER_CI_BRANCH}_full:dune-2.9-gcc-ubuntu-$UBUNTU_VERSION + image: $IMAGE_REGISTRY_URL/alpine stage: check-status rules: - if: $CI_PIPELINE_SOURCE == "schedule" -- GitLab From e18cc3ac1ab1787cdb374b12d5e6558dcd167879 Mon Sep 17 00:00:00 2001 From: Mathis Kelm <mathis.kelm@iws.uni-stuttgart.de> Date: Thu, 27 Jun 2024 19:36:35 +0200 Subject: [PATCH 21/22] [ci] cleanup image name definition --- .gitlab-ci.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9953e29..3328c46 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,8 +23,7 @@ variables-parse-job: DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" - IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" - echo "IMAGE=$IMAGE" | tee -a dynamic-variables.env + echo "IMAGE_NAME=$IMAGE_NAME" | tee -a dynamic-variables.env echo "UBUNTU_VERSION=$UBUNTU_VERSION" | tee -a dynamic-variables.env echo "DUMUX_DOCKER_CI_BRANCH=$DUMUX_DOCKER_CI_BRANCH" | tee -a dynamic-variables.env artifacts: @@ -78,10 +77,7 @@ check-pipeline-status: "https://git.iws.uni-stuttgart.de/api/v4/projects/33/trigger/pipeline" else echo "Found successful pipeline for the current state of the branch. Not testing again." - fi - - - + fi # rules for the default triggers: # - pipelines are triggered for merge requests and external triggers (e.g. nightly build in dumux) @@ -107,8 +103,7 @@ check-pipeline-status: DUMUX_TRIGGER_REF_SHA: $DUMUX_REFERENCE_SHA LECTURE_CI_REFERENCE_SHA: $CI_REFERENCE_SHA - full-dune-latest-release-gcc: extends: .default-trigger variables: - IMAGE: $IMAGE + IMAGE: "$IMAGE_REGISTRY_URL/$IMAGE_NAME:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" -- GitLab From a0e8798ca44d4c8efe2272cbf066f037c2b75a88 Mon Sep 17 00:00:00 2001 From: Mathis Kelm <mathis.kelm@iws.uni-stuttgart.de> Date: Thu, 27 Jun 2024 21:08:00 +0200 Subject: [PATCH 22/22] [ci] correct variable name, define full image in pre-processing job --- .gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3328c46..3ec3595 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -20,10 +20,11 @@ variables-parse-job: when: always script: - | - DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_CI_BRANCH:-master} + DUMUX_DOCKER_CI_BRANCH=${DUMUX_DOCKER_BRANCH:-master} UBUNTU_VERSION=${DUMUX_UBUNTU_VERSION:-22.04} IMAGE_NAME="${DUMUX_DOCKER_CI_BRANCH}_full" - echo "IMAGE_NAME=$IMAGE_NAME" | tee -a dynamic-variables.env + IMAGE="$IMAGE_REGISTRY_URL/${IMAGE_NAME}:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" + echo "IMAGE=$IMAGE" | tee -a dynamic-variables.env echo "UBUNTU_VERSION=$UBUNTU_VERSION" | tee -a dynamic-variables.env echo "DUMUX_DOCKER_CI_BRANCH=$DUMUX_DOCKER_CI_BRANCH" | tee -a dynamic-variables.env artifacts: @@ -106,4 +107,4 @@ check-pipeline-status: full-dune-latest-release-gcc: extends: .default-trigger variables: - IMAGE: "$IMAGE_REGISTRY_URL/$IMAGE_NAME:dune-$DUMUX_CI_DUNE_LATEST_RELEASE-gcc-ubuntu-$UBUNTU_VERSION" + IMAGE: $IMAGE -- GitLab