mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -04:00
[quick checks/validate_pipelines] Fix list of changed files (#219150)
Fixes an issue where `validate_pipelines.sh` could attempt to validate a pipeline file that does not exist. The check was looking for changed files comparing `elastic/kibana/main` and the pull request branch, where an out of date pull request could return a changed file that was not modified in the pr branch. See https://buildkite.com/elastic/kibana-pull-request/builds/295938#019668ee-99f0-409e-bd7d-466e6293e982
This commit is contained in:
parent
442cf9b7be
commit
fc226cc198
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ check_for_changed_files "$cmd" true
|
|||
|
||||
if [[ "${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-}" != "" ]]; then
|
||||
echo --- Check if all new pipelines are valid
|
||||
AFFECTED_PIPELINES=$(git diff "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" --name-only | \
|
||||
AFFECTED_PIPELINES=$(gh pr view "$BUILDKITE_PULL_REQUEST" --json files --jq '.files.[].path' | \
|
||||
grep -E '^.buildkite/pipeline-resource-definitions/.*\.yml$' | \
|
||||
grep -Ev '(/locations.yml|_templates)' || true)
|
||||
echo "Pipelines affected by this PR: $AFFECTED_PIPELINES"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue