Skip to content
Snippets Groups Projects
Commit 7770fbfa authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[ci] remove default value for target branch

The idea is to evaluate differences between the current branch and the 
target branch for merge requests. Having a default we don't notice if 
this breaks when someone removes the target branch variable passed from 
the parent pipeline.
parent fe78beb1
No related branches found
No related tags found
1 merge request!2626feature/refactor-test-selection
...@@ -10,9 +10,10 @@ workflow: ...@@ -10,9 +10,10 @@ workflow:
rules: rules:
- if: $CI_PIPELINE_SOURCE=="parent_pipeline" - if: $CI_PIPELINE_SOURCE=="parent_pipeline"
# variables that may be overwritten by the trigger
variables: variables:
TRIGGER_SOURCE: "unknown" TRIGGER_SOURCE: "undefined"
MR_TARGET_BRANCH_NAME: "master" MR_TARGET_BRANCH_NAME: "undefined"
select tests: select tests:
stage: configure stage: configure
...@@ -20,7 +21,7 @@ select tests: ...@@ -20,7 +21,7 @@ select tests:
- | - |
dunecontrol --opts=$DUNE_OPTS_FILE --current all dunecontrol --opts=$DUNE_OPTS_FILE --current all
if [[ "$TRIGGER_SOURCE" == "merge_request_event" ]]; then if [[ "$TRIGGER_SOURCE" == "merge_request_event" ]]; then
echo "Detecting changes w.r.t to branch $MR_TARGET_BRANCH_NAME" echo "Detecting changes w.r.t to target branch '$MR_TARGET_BRANCH_NAME'"
python3 bin/testing/getchangedfiles.py -o changedfiles.txt -t origin/$MR_TARGET_BRANCH_NAME python3 bin/testing/getchangedfiles.py -o changedfiles.txt -t origin/$MR_TARGET_BRANCH_NAME
python3 bin/testing/findtests.py -o affectedtests.json --file-list changedfiles.txt --build-dir build-cmake python3 bin/testing/findtests.py -o affectedtests.json --file-list changedfiles.txt --build-dir build-cmake
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment