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: ...@@ -25,7 +25,7 @@ stages:
- test - test
- deploy - deploy
setup:dune-env: setup:dune-env: &setup
stage: setup stage: setup
only: only:
- web # activate through 'Run pipeline' only. - web # activate through 'Run pipeline' only.
...@@ -45,19 +45,11 @@ setup:dune-env: ...@@ -45,19 +45,11 @@ setup:dune-env:
- docker push $DUNE_ENV_IMAGE - docker push $DUNE_ENV_IMAGE
prep:update-dune: prep:update-dune:
<<: *setup
stage: prep stage: prep
only: only:
- master - master
- tags - tags
tags:
- dind
image: docker:stable
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
before_script:
- $DOCKER_LOGIN
script: script:
- docker build -f docker/dune-env-update.dockerfile - docker build -f docker/dune-env-update.dockerfile
--build-arg DUNE_ENV_IMAGE=$DUNE_ENV_IMAGE --build-arg PROCNUM=$CPUS_DIND --build-arg DUNE_ENV_IMAGE=$DUNE_ENV_IMAGE --build-arg PROCNUM=$CPUS_DIND
...@@ -95,7 +87,7 @@ build:debug: ...@@ -95,7 +87,7 @@ build:debug:
- MAKE_FLAGS="$MAKE_FLAGS" - MAKE_FLAGS="$MAKE_FLAGS"
$DUNECONTROL --only=dorie make build_tests $DUNECONTROL --only=dorie make build_tests
test:exec_cmds: test:exec_cmds: &test
stage: test stage: test
dependencies: dependencies:
- build:main - build:main
...@@ -109,60 +101,30 @@ test:exec_cmds: ...@@ -109,60 +101,30 @@ test:exec_cmds:
expire_in: 1 day expire_in: 1 day
test:ode: test:ode:
stage: test <<: *test
dependencies:
- build:main
script: script:
- $DUNECONTROL --only=dorie configure - $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_run_ode - $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: test:parallel:
stage: test <<: *test
dependencies:
- build:main
tags:
- multicore
script: script:
- $DUNECONTROL --only=dorie configure - $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_run_parallel - $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: test:reference:
stage: test <<: *test
dependencies:
- build:main
script: script:
- $DUNECONTROL --only=dorie configure - $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_run_ref - $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: test:mass_conserve:
stage: test <<: *test
dependencies:
- build:main
script: script:
- $DUNECONTROL --only=dorie configure - $DUNECONTROL --only=dorie configure
- $DUNECONTROL --only=dorie make test_mass_conservation - $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 stage: deploy
only: only:
- master@dorie/dorie - master@dorie/dorie
...@@ -182,18 +144,9 @@ deploy:dockerhub-devel: ...@@ -182,18 +144,9 @@ deploy:dockerhub-devel:
- docker push dorie/dorie:devel - docker push dorie/dorie:devel
deploy:dockerhub-stable: deploy:dockerhub-stable:
stage: deploy <<: *deploy
only: only:
- tags@dorie/dorie - tags@dorie/dorie
tags:
- dind
image: docker:stable
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
before_script:
- $DOCKER_LOGIN
script: script:
- docker build -f docker/dorie.dockerfile - docker build -f docker/dorie.dockerfile
--build-arg DUNE_ENV_IMAGE=$DUNE_ENV_IMAGE --build-arg PROCNUM=$CPUS_DIND --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