From 8c94b725b330b1ba40357042861bd5ec38130cd4 Mon Sep 17 00:00:00 2001 From: Tim Jaacks <tim.jaacks@garz-fricke.com> Date: Tue, 30 Aug 2022 21:18:41 +0200 Subject: [PATCH] ci-test: add job to check for correct foo branch This should catch an error where during a gitlab-ci merge process the wrong foo branch is integrated into the manifest, which happened in Yocto. --- build-jobs-ci-test.yml.jinja2 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/build-jobs-ci-test.yml.jinja2 b/build-jobs-ci-test.yml.jinja2 index 3132ff50..1155758c 100644 --- a/build-jobs-ci-test.yml.jinja2 +++ b/build-jobs-ci-test.yml.jinja2 @@ -61,6 +61,28 @@ build:echo: - printenv - echo "Build successful" +build:check-foo-branch: + stage: build + extends: + - .buildbase + needs: [] + tags: + - infrastructure + timeout: 2m + variables: + GIT_STRATEGY: none + before_script: + - !reference [.docker_check] + - !reference [.setup_ssh] + - !reference [.repo_checkout] + script: | + echo "repo branch: $MASTER_BRANCH" + echo "foo branch: $(cat foo/branch.txt)" + if [[ "$MASTER_BRANCH" != $(cat foo/branch.txt) ]]; then + echo "ERROR: Branches do not match!" + exit 1 + fi + build-imx6guf-fake: stage: build needs: [] -- GitLab