Commit 250e2b98 authored by Jan Kiene's avatar Jan Kiene
Browse files

add MR title flag mechanism for allowing regressions

parent 7c39f53f
Loading
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -320,6 +320,10 @@ stages:
    -   *apply-testv-scaling
    - fi

    # check MR title for flag that allows regressions to be mergable
    - echo $CI_MERGE_REQUEST_TITLE > tmp.txt
    - allow_regressions_flag=$(grep -c --ignore-case "\[allow[ -]*regression\]" tmp.txt) || true

    ### run branch first
    # this per default builds the branch and the reference and creates the reference outputs
    - *build-and-create-reference-outputs
@@ -344,8 +348,15 @@ stages:
    - regressions_found=0
    - python3 scripts/basop_check_for_changes_in_testcases.py $CSV_BRANCH $CSV_MAIN || regressions_found=$?

    - if [ $regressions_found != 0 ]; then echo "Detected regression wrt to main!"; exit $EXIT_CODE_FAIL; fi
    - if [ $zero_errors_branch != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_FAIL; fi
    - if [ $regressions_found != 0 ]; then
    -    echo "Detected regression wrt to main!"
    -    if [ $allow_regressions_flag == 0 ]; then
    -        exit $EXIT_CODE_FAIL;
    -    else
    -        exit $EXIT_CODE_NON_BE;
    -    fi
    - fi
    - if [ $zero_errors_branch != 1 ]; then echo "Run errors encountered!"; exit $EXIT_CODE_NON_BE; fi
    - if [ $exit_code -eq 1 ]; then echo "Differences encountered"; exit $EXIT_CODE_NON_BE; fi
    - exit 0
  allow_failure: