Commit d1b0957b authored by Dennis Gläser's avatar Dennis Gläser Committed by Dennis
Browse files

[ci] ensure that upstream mr branches are present

parent 6ac653ee
Pipeline #4711 passed with stage
......@@ -22,23 +22,24 @@ select tests:
stage: configure
before_script:
- |
DUMUX_CLONE_BRANCH=master
if [[ "$DUMUX_PIPELINE_SOURCE" == "merge_request_event" ]]; then
echo "Starting pipeline triggered by upstream merge request event"
echo "Received upstream merge request branch ${DUMUX_MR_SOURCE_BRANCH}"
DUMUX_CLONE_BRANCH=${DUMUX_MR_SOURCE_BRANCH}
echo "Cloning upstream merge request source/target branches ${DUMUX_MR_SOURCE_BRANCH}/${DUMUX_MR_TARGET_BRANCH}"
git clone -b ${DUMUX_MR_SOURCE_BRANCH} --depth=1 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git
pushd dumux
git fetch --depth=1 origin ${DUMUX_MR_TARGET_BRANCH}:${DUMUX_MR_TARGET_BRANCH}
popd
else
echo "Cloning into Dumux master"
git clone -b master --depth 1 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git
fi
- echo "Checking out branch ${DUMUX_CLONE_BRANCH} in dumux"
- git clone -b ${DUMUX_CLONE_BRANCH} --depth 1 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git
- dunecontrol --opts=$DUNE_OPTS_FILE --only=dumux all
script:
- dunecontrol --opts=$DUNE_OPTS_FILE --current all
- |
echo "Check if tests affected by changes have to be identified"
if [[ "$DUMUX_PIPELINE_SOURCE" == "merge_request_event" ]]; then
CHECK_FOLDER="dumux"
SOURCE_TREE=origin/$DUMUX_MR_SOURCE_BRANCH
TARGET_TREE=origin/$DUMUX_MR_TARGET_BRANCH
SOURCE_TREE=$DUMUX_MR_SOURCE_BRANCH
TARGET_TREE=$DUMUX_MR_TARGET_BRANCH
elif [[ "$TRIGGER_SOURCE" == "merge_request_event" ]]; then
CHECK_FOLDER="."
SOURCE_TREE="HEAD"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment