Do not trigger tests if only docs were modified (#9240) (#9243)

This commit is contained in:
Dan Albert
2020-04-01 14:46:38 -06:00
committed by GitHub
parent c8b4f616b0
commit a33e8cc164
3 changed files with 69 additions and 31 deletions

21
ci/maybe-trigger-tests.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -e
cd "$(dirname "$0")/.."
annotate() {
${BUILDKITE:-false} && {
buildkite-agent annotate "$@"
}
}
# Skip if only the docs have been modified
ci/affects-files.sh \
\!^docs/ \
|| {
annotate --style info \
"Skipping all further tests as only docs/ files were modified"
exit 0
}
annotate --style info "Triggering tests"
buildkite-agent pipeline upload ci/buildkite-tests.yml