diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1ecb97..f463e6a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,13 +59,14 @@ load_vars: stage: pre script: - echo "Loading variables from vars.yml..." - - cat /ci/vars.env >> build.env + - cat /ci/my_branch.env >> build.env artifacts: reports: dotenv: build.env formatter: stage: Formatter + needs: ["load_vars"] before_script: - "" script: @@ -79,6 +80,7 @@ formatter: pylint: stage: Formatter + needs: ["load_vars"] script: - pip install pylint pylint-exit anybadge - mkdir ./pylint @@ -96,7 +98,7 @@ pylint: pylint-check: stage: Formatter - needs: [] + needs: ["load_vars"] allow_failure: true before_script: - pip install pylint pylint-exit anybadge @@ -137,6 +139,7 @@ secret_detection: pytest: stage: test + needs: ["load_vars"] script: - pip install coverage - coverage run --source=./ophyd_devices -m pytest -v --junitxml=report.xml --random-order --full-trace ./tests @@ -153,6 +156,7 @@ pytest: config_test: stage: test + needs: ["load_vars"] script: - ophyd_test --config ./ophyd_devices/configs/ --output ./config_tests artifacts: @@ -169,6 +173,7 @@ tests-3.11: optional: true - job: "pylint" optional: true + - job: "load_vars" image: $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/python:3.11 script: - pytest -v --random-order ./tests @@ -182,6 +187,7 @@ tests-3.12: allow_failure: true trigger_bec: + needs: ["load_vars"] trigger: project: bec/bec strategy: depend @@ -205,7 +211,7 @@ trigger: - CHILD_PROJECT: xtreme_bec CHILD_PIPELINE_BRANCH: $XTREME_BEC_BRANCH - needs: [] + needs: ["load_vars"] trigger: strategy: depend include: @@ -225,7 +231,7 @@ trigger: semver: stage: Deploy - needs: ["pytest"] + needs: ["pytest", "load_vars"] script: - git config --global user.name "ci_update_bot" - git config --global user.email "ci_update_bot@bec.ch"