# 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
# 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 -e "Your branch is $commits_behind_count commits behind the target branch, possibly main changed during your pipeline run. Checking bitexactness or testing for regressions now can result in meaningless results. Run\n\t git pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME\nto update."
# turn off echoing back of commands for result printout
-*print-results-banner
-echo -e "All tested cases were bit-exact between $CI_MERGE_REQUEST_TARGET_BRANCH_NAME and $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME.\nNo need to check for regressions. All is fine."
-exit 0
-fi
-*update-scripts-repo
-if [ $USE_LTV -eq 1 ]; then
-*update-ltv-repo
-*copy-ltv-files-to-testv-dir
-testcase_timeout=$TESTCASE_TIMEOUT_LTV
-else
-testcase_timeout=$TESTCASE_TIMEOUT_STV
-fi
-*remove_unsupported_testcases
-if [ $LEVEL_SCALING != "1.0" ];then
-*apply-testv-scaling
-fi
# check MR title for flag that allows regressions to be mergable
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-to-main-pc
stage:postvalidate
tags:
-ivas-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."
exit 1
fi
# fail pipeline in the final stage for pipelines on Draft MRs
# this also only runs on Draft MRs, so should always fail
echo -e "Your branch is $commits_behind_count commits behind the target branch, run\n\tgit pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME\nto update."
exit 1
fi
branch-is-up-to-date-with-target-post:
extends:
-.rules-merge-request
stage:postvalidate
tags:
-ivas-linux
script:
-*get-commits-behind-count
-|
if [ $commits_behind_count -ne 0 ]; then
echo -e "Your branch is $commits_behind_count commits behind the target branch, possibly main changed during your pipeline run, run\n\tgit pull origin $CI_MERGE_REQUEST_TARGET_BRANCH_NAME\nto update."