Skip to content

Commit

Permalink
[OAS] Publish OAS bundles to bump.sh (elastic#197482)
Browse files Browse the repository at this point in the history
## Summary

Publish OAS docs to bump.sh on merge to `main` or `8.x`

## To reviewers
* For now actual publication requires a manual step on bump.sh (so
things aren't going live immediately)
* Will get to serverless OAS docs next!

## Blockers

* Address vulnerable deps before merging:
bump-sh/cli#583

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
2 people authored and CAWilson94 committed Nov 18, 2024
1 parent f9717b0 commit cea782c
Show file tree
Hide file tree
Showing 12 changed files with 20,170 additions and 11,324 deletions.
12 changes: 6 additions & 6 deletions .buildkite/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions .buildkite/pipelines/on_merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,21 @@ steps:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/openapi_publishing/publish_oas_docs.sh
label: 'Publish OAS docs to bump.sh'
agents:
image: family/kibana-ubuntu-2004
imageProject: elastic-images-prod
provider: gcp
machineType: n2-standard-2
preemptible: true
timeout_in_minutes: 60
continue_on_failure: true
retry:
automatic:
- exit_status: '-1'
limit: 3

- command: .buildkite/scripts/steps/bazel_cache/bootstrap_linux.sh
label: 'Populate local dev bazel cache (Linux)'
agents:
Expand Down
10 changes: 9 additions & 1 deletion .buildkite/scripts/steps/openapi_bundling/final_merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ set -euo pipefail

source .buildkite/scripts/common/util.sh

cur_dir=$(pwd)
cd oas_docs

echo --- Installing NPM modules
npm install

echo --- Merge Kibana OpenAPI specs
make api-docs
# make api-docs-lint <-- Relies on JSONPath version with RCE vulnerabilities based on `npm audit`, https://github.com/advisories/GHSA-pppg-cpfq-h7wr

(cd oas_docs && make api-docs && make api-docs-lint)
cd "$cur_dir"

check_for_changed_files "make api-docs" true
Loading

0 comments on commit cea782c

Please sign in to comment.