Commit c7d71f70 authored by Fabian Müller's avatar Fabian Müller
Browse files

Migrate branch-is-up-to-date-* jobs from upstream

parent 62f61111
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
@@ -102,6 +102,7 @@ stages:
  - build
  - test
  - compare
  - postvalidate
  - deploy

# ---------------------------------------------------------------
@@ -652,6 +653,34 @@ uninterruptible:
  tags:
    - ivas-basop-linux

# ---------------------------------------------------------------
# Validation jobs
# ---------------------------------------------------------------

branch-is-up-to-date-with-target-pre:
  extends:
    - .rules-merge-request
  stage: prevalidate
  needs: []
  tags:
    - ivas-basop-linux
  script:
    - *get-commits-behind-count
    - echo $commits_behind_count
    - if [ $commits_behind_count -eq 0 ]; then exit 0; else echo "Your branch is behind main, run 'git merge origin/main' to update."; exit 1; fi;

branch-is-up-to-date-with-target-post:
  extends:
    - .rules-merge-request
  stage: postvalidate
  tags:
    - ivas-basop-linux
  script:
    - *get-commits-behind-count
    - echo $commits_behind_count
    - if [ $commits_behind_count -eq 0 ]; then exit 0; else echo "Your branch is behind main, possibly main changed during your pipeline run, run 'git merge origin/main' to update." exit 1; fi;


# ---------------------------------------------------------------
# verification jobs
# ---------------------------------------------------------------