Remove build hash from Storybook upload #206687
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
After a CI run, Storybooks are built. Each commit is built and uploaded separately, which makes sense:
https://github.com/elastic/kibana/blob/main/.buildkite/scripts/steps/storybooks/build_and_upload.ts#L24
Unfortunately, we don't have a way to consistently point to main, or to a PR.
PRs
Using #206540 as an example, the Storybook is currently hosted at:
https://ci-artifacts.kibana.dev/storybooks/pr-206540/803ec26fb200e1fd23c33ead174dcc5356262cfc
This means that, if I push another commit, the URL will change... so all of the links I've posted in Slack are now invalid. This PR changes the URL so it will remain:
https://ci-artifacts.kibana.dev/storybooks/pr-206540
regardless of how many commits I push.
main
Furthermore, being able to visit https://ci-artifacts.kibana.dev/storybooks/main/latest/index.html to see the most recent Storybook build is awesome. The issue is each Storybook is hosted with that same hash:
https://ci-artifacts.kibana.dev/storybooks/main/5ad3ef7b0a76968a31b0824bd08f9132c374c841/shared_ux/index.html
So this PR alters the URL so you can consistently point to the latest Storybook build:
https://ci-artifacts.kibana.dev/storybooks/main/shared_ux/index.html