Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.16] [ci] Extract OAS check + add retry (#196534) #196802

Merged
merged 3 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,20 @@ steps:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/checks/capture_oas_snapshot.sh
label: 'Check OAS Snapshot'
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-2
preemptible: true
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/storybooks/build_and_upload.sh
label: 'Build Storybooks'
agents:
Expand Down
11 changes: 11 additions & 0 deletions .buildkite/pipelines/pull_request/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,17 @@ steps:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/checks/capture_oas_snapshot.sh
label: 'Check OAS Snapshot'
agents:
machineType: n2-standard-2
preemptible: true
timeout_in_minutes: 60
retry:
automatic:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/api_docs/build_api_docs.sh
label: 'Build API Docs'
agents:
Expand Down
1 change: 0 additions & 1 deletion .buildkite/scripts/steps/checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ if [[ "${FTR_ENABLE_FIPS_AGENT:-}" == "true" ]]; then
fi
.buildkite/scripts/steps/checks/saved_objects_compat_changes.sh
.buildkite/scripts/steps/checks/saved_objects_definition_change.sh
.buildkite/scripts/steps/capture_oas_snapshot.sh
.buildkite/scripts/steps/code_generation/elastic_assistant_codegen.sh
.buildkite/scripts/steps/code_generation/security_solution_codegen.sh
.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -euo pipefail

.buildkite/scripts/bootstrap.sh

source .buildkite/scripts/common/util.sh

echo --- Capture OAS snapshot
Expand All @@ -14,5 +16,10 @@ if [[ $BUILDKITE_PULL_REQUEST != "false" && "$BUILDKITE_PULL_REQUEST_BASE_BRANCH
cmd="$cmd --no-serverless"
fi

eval "$cmd"
check_for_changed_files "$cmd" true
run_check() {
eval "$cmd"
}

retry 5 15 run_check

check_for_changed_files "$cmd" true