Skip to content
Snippets Groups Projects
Commit a44be468 authored by Mathis Kelm's avatar Mathis Kelm
Browse files

[ci] add variable for ubuntu version, can be passed from dumux

parent 88b0f391
No related branches found
No related tags found
1 merge request!223[ci] add variable for ubuntu version, can be passed from dumux
......@@ -2,19 +2,40 @@
# SPDX-License-Identifier: GPL-3.0-or-later
stages:
- 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"
variables-parse-job:
image: $IMAGE_REGISTRY_URL/alpine
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_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
# 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/alpine
stage: check-status
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
......@@ -70,9 +91,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: $CI_PIPELINE_SOURCE == "pipeline"
when: always
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
......@@ -89,5 +107,4 @@ check-pipeline-status:
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment