affected_files metadata is only available for PR builds

This commit is contained in:
Michael Vines 2018-12-18 11:42:05 -08:00 committed by Grimes
parent 3bfb052b0a
commit bc52336a1b
1 changed files with 8 additions and 6 deletions

View File

@ -9,12 +9,14 @@ annotate() {
}
}
affectedFiles="$(buildkite-agent meta-data get affected_files)"
echo "Affected files in this PR: $affectedFiles"
if [[ ! ":$affectedFiles:" =~ \.rs: ]]; then
annotate --style info --context coverage-info \
"Coverage skipped as no .rs files were modified"
exit 0
if ci/is-pr.sh; then
affectedFiles="$(buildkite-agent meta-data get affected_files)"
echo "Affected files in this PR: $affectedFiles"
if [[ ! ":$affectedFiles:" =~ \.rs: ]]; then
annotate --style info --context coverage-info \
"Coverage skipped as no .rs files were modified"
exit 0
fi
fi
source ci/upload-ci-artifact.sh