# When designing templates, try not to use too much inheritance and
# if multiple templates and extended on, remember that on conflict,
# latest overwrites the parameter.
# templates for rules
.rules-basis:
rules:
-if:$MIRROR_ACCESS_TOKEN# Don't run in the mirror update pipeline (only then MIRROR_ACCESS_TOKEN is defined)
when:never
-if:$CI_PIPELINE_SOURCE == 'schedule'# Don't run in any scheduled pipelines by default (use schedule templates below to enable again for certain conditions)
when:never
-if:$CI_PIPELINE_SOURCE == 'trigger'# Don't run triggered pipeline by default
when:never
-if:$MANUAL_PIPELINE_TYPE == 'test-be-release'# Skip all the normal jobs when testing manually against release codec
when:never
-if:$MANUAL_PIPELINE_TYPE == 'test-long-self-test'# Skip all the normal jobs when testing manually against release codec
echo "Your branch is behind the target branch, run 'git pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME' 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 -ne 0 ]; then
echo "Your branch is behind the target branch, possibly main changed during your pipeline run, run 'git pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME' to update."