Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux-lecture
Commits
d1b0957b
Commit
d1b0957b
authored
May 20, 2021
by
Dennis Gläser
Committed by
Dennis
May 25, 2021
Browse files
[ci] ensure that upstream mr branches are present
parent
6ac653ee
Pipeline
#4711
passed with stage
Changes
1
Pipelines
5
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci/default.yml
View file @
d1b0957b
...
...
@@ -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"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment