Commit 09f517d7 authored by Lukas Riedel's avatar Lukas Riedel

Use YAML anchors to increase maintainability of CI config

parent af22b6d0
......@@ -25,7 +25,7 @@ stages:
- test
- deploy
setup:dune-env:
setup:dune-env: &setup
stage: setup
only:
- web # activate through 'Run pipeline' only.
......@@ -45,19 +45,11 @@ setup:dune-env:
- docker push $DUNE_ENV_IMAGE
prep:update-dune:
<<: *setup
stage: prep
only:
- master
- tags
tags:
- dind
image: docker:stable
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
before_script:
- $DOCKER_LOGIN
script:
- docker build -f docker/dune-env-update.dockerfile
--build-arg DUNE_ENV_IMAGE=$DUNE_ENV_IMAGE --build-arg PROCNUM=$CPUS_DIND
......@@ -95,7 +87,7 @@ build:debug:
- MAKE_FLAGS="$MAKE_FLAGS"
$DUNECONTROL --only=dorie make build_tests
test:exec_cmds:
test:exec_cmds: &test
stage: test
dependencies:
- build:main
......@@ -109,60 +101,30 @@ test:exec_cmds:
expire_in: 1 day
test:ode:
stage: test
dependencies:
- build:main
<<: *test
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_run_ode
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/Testing
expire_in: 1 day
test:parallel:
stage: test
dependencies:
- build:main
tags:
- multicore
<<: *test
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_run_parallel
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/Testing
expire_in: 1 day
test:reference:
stage: test
dependencies:
- build:main
<<: *test
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_run_ref
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/Testing
expire_in: 1 day
test:mass_conserve:
stage: test
dependencies:
- build:main
<<: *test
script:
- $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_mass_conservation
artifacts:
name: "$CI_JOB_NAME"
paths:
- $CI_PROJECT_DIR/build-cmake/Testing
expire_in: 1 day
deploy:dockerhub-devel:
deploy:dockerhub-devel: &deploy
stage: deploy
only:
- master@dorie/dorie
......@@ -182,18 +144,9 @@ deploy:dockerhub-devel:
- docker push dorie/dorie:devel
deploy:dockerhub-stable:
stage: deploy
<<: *deploy
only:
- tags@dorie/dorie
tags:
- dind
image: docker:stable
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
before_script:
- $DOCKER_LOGIN
script:
- docker build -f docker/dorie.dockerfile
--build-arg DUNE_ENV_IMAGE=$DUNE_ENV_IMAGE --build-arg PROCNUM=$CPUS_DIND
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment