diff options
author | Zoltan Varga <vargaz@gmail.com> | 2019-08-02 18:12:46 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2019-08-02 18:12:46 +0300 |
commit | 5bb4f1eea8501a61c87bed0cf752b3f700c77556 (patch) | |
tree | ec1231b944dd17f1a6c6d3e3432937286b520c25 /scripts | |
parent | d0aa0310ee386433a9ef0b4c15ac07c928211bcb (diff) |
[ci] Skip jenkins lanes for PRs which only contain changes to the netcore/ subdir. (#15978)
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/ci/run-jenkins.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/ci/run-jenkins.sh b/scripts/ci/run-jenkins.sh index ac22d0157a1..871c53c7efd 100755 --- a/scripts/ci/run-jenkins.sh +++ b/scripts/ci/run-jenkins.sh @@ -13,6 +13,21 @@ for dir in acceptance-tests/external/*; do [ -d "$dir" ] && (cd "$dir" && echo " source ${MONO_REPO_ROOT}/scripts/ci/util.sh +if [[ ${CI_TAGS} == *'pull-request'* ]]; then + # Skip lanes which are not affected by the PR + diff_url=`echo $ghprbPullLink`.diff + wget -O pr-contents.diff $diff_url + grep '^diff' pr-contents.diff > pr-files.txt + cat pr-files.txt + + # FIXME: Add more + if ! grep -q -v a/netcore pr-files.txt; then + echo "NetCore only PR, skipping." + ${TESTCMD} --label="Skipped on NETCORE." --timeout=60m --fatal sh -c 'exit 0' + exit 0 + fi +fi + helix_set_env_vars helix_send_build_start_event "build/source/$MONO_HELIX_TYPE/" |