diff --git a/.buildkite/scripts/steps/console_definitions_sync.sh b/.buildkite/scripts/steps/console_definitions_sync.sh index 55719292959e8..7dc565e0b9642 100755 --- a/.buildkite/scripts/steps/console_definitions_sync.sh +++ b/.buildkite/scripts/steps/console_definitions_sync.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash set -euo pipefail +GIT_SCOPE="src/plugins/console/server/lib/spec_definitions" + report_main_step () { echo "--- $1" } @@ -16,14 +18,16 @@ main () { exit 1 fi + report_main_step "Bootstrapping Kibana" cd "$KIBANA_DIR" + .buildkite/scripts/bootstrap.sh report_main_step "Generating console definitions" node scripts/generate_console_definitions.js --source "$PARENT_DIR/elasticsearch-specification" --emptyDest # Check if there are any differences set +e - git diff --exit-code --quiet "$destination_file" + git diff --exit-code --quiet "$GIT_SCOPE" if [ $? -eq 0 ]; then echo "No differences found. Exiting.." exit @@ -54,7 +58,7 @@ main () { git checkout -b "$BRANCH_NAME" - git add src/plugins/console/server/lib/spec_definitions/json/generated/* + git add $GIT_SCOPE git commit -m "Update console definitions" report_main_step "Changes committed. Creating pull request."