diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 187fc47b51906b0a35a5061a6e51efd4f2482078..6730578dae39c1f79d2671a207fd0f82a9ae2d08 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,12 @@ stages: - - triggers # TODO remove - build - test - check - deploy + +# Theodolite Benchmarks + .benchmarks: image: openjdk:11-jdk tags: @@ -237,39 +239,34 @@ deploy-uc4-load-generator: allow_failure: true +# Theodolite Framework - - - - - - - -############## - - - - -benchmarks-trigger: - stage: triggers - trigger: - include: benchmarks/.gitlab-ci.yml - strategy: depend +deploy-theodolite: + stage: deploy + tags: + - exec-dind + image: docker:19.03.1 + services: + - docker:19.03.1-dind + variables: + DOCKER_TLS_CERTDIR: "/certs" + script: + - DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//') + - docker build --pull -t theodolite ./execution + - "[ ! $CI_COMMIT_TAG ] && docker tag theodolite ghcr.io/$CR_ORG/theodolite:${DOCKER_TAG_NAME}latest" + - "[ ! $CI_COMMIT_TAG ] && docker tag theodolite ghcr.io/$CR_ORG/theodolite:$DOCKER_TAG_NAME$CI_COMMIT_SHORT_SHA" + - "[ $CI_COMMIT_TAG ] && docker tag theodolite ghcr.io/$CR_ORG/theodolite:$CI_COMMIT_TAG" + - echo $CR_PW | docker login ghcr.io -u $CR_USER --password-stdin + - docker push $CR_HOST/$CR_ORG/theodolite + - docker logout rules: - - if: "$CI_COMMIT_TAG" + - if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $CI_COMMIT_TAG" + when: always - changes: - - benchmarks/* - - when: manual + - execution/**/* + if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW" + when: always + - if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW" + when: manual allow_failure: true -execution: - stage: triggers - trigger: - include: execution/.gitlab-ci.yml - strategy: depend - rules: - - if: "$CI_COMMIT_TAG" - - changes: - - execution/* - - when: manual - allow_failure: true