From 0d1403392bddd1d6df0554c8f779b602c3f8c2df Mon Sep 17 00:00:00 2001 From: Lukas Riedel Date: Tue, 5 Jun 2018 21:42:06 +0200 Subject: [PATCH] Rework CI pipeline and set triggers for jobs * setup:dune-env only executes for 'Run pipeline' trigger * prep:update-dune only runs for master and tags * deploy jobs only run for master and tags * split deploy jobs into two cases for master and tags, respectively --- .gitlab-ci.yml | 61 +++++++++++++++++++++----------------------------- 1 file changed, 25 insertions(+), 36 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 18c96596..2ee65bbd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,6 +24,8 @@ stages: setup:dune-env: stage: setup + only: + - web # activate through 'Run pipeline' only. tags: - dind image: docker:stable @@ -39,6 +41,9 @@ setup:dune-env: prep:update-dune: stage: prep + only: + - master + - tags tags: - dind image: docker:stable @@ -68,26 +73,6 @@ build:main: - $CI_PROJECT_DIR/build-cmake expire_in: 1 day -build:update_dune: - stage: build - tags: - - multicore - only: - - master - script: - - $DUNECONTROL update - - $DUNECONTROL exec "rm -rf build-cmake" - - CMAKE_FLAGS="$CMAKE_FLAGS" - MAKE_FLAGS="$MAKE_FLAGS" - $DUNECONTROL --module=dorie all - - MAKE_FLAGS="$MAKE_FLAGS" - $DUNECONTROL --only=dorie make build_tests - artifacts: - name: "$CI_JOB_NAME" - paths: - - $CI_PROJECT_DIR/build-cmake - expire_in: 1 day - build:debug: stage: build allow_failure: true @@ -129,21 +114,6 @@ test:ode: - $CI_PROJECT_DIR/build-cmake/Testing expire_in: 1 day -test:ode-update_dune: - stage: test - dependencies: - - build:update_dune - only: - - master - 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: @@ -185,8 +155,10 @@ test:mass_conserve: - $CI_PROJECT_DIR/build-cmake/Testing expire_in: 1 day -deploy:docker: +deploy:dockerhub-devel: stage: deploy + only: + - master tags: - dind image: docker:stable @@ -199,3 +171,20 @@ deploy:docker: script: - docker build --build-arg PROCNUM=$DIND_PROCNUM -f dockerfiles/dorie -t dorie/dorie:devel . - docker push dorie/dorie:devel + +deploy:dockerhub-stable: + stage: deploy + only: + - tags + tags: + - dind + image: docker:stable + services: + - docker:dind + variables: + DOCKER_DRIVER: overlay2 + before_script: + - $DOCKER_LOGIN + script: + - docker build --build-arg PROCNUM=$DIND_PROCNUM -f dockerfiles/dorie -t dorie/dorie:$CI_COMMIT_TAG . + - docker push dorie/dorie:$CI_COMMIT_TAG -- GitLab