[CI] Build and publish storybooks#87701
Conversation
|
|
||
| for(const alias of Object.keys(aliases).filter(a => a !== 'ci_composite')) { | ||
| // snake_case -> Title Case | ||
| const title = alias |
There was a problem hiding this comment.
In a draft PR (#80061) I started by making the aliases an object so that a title could be added. Doing this transformation would probably be fine if there were no title specified, but it would be better to allow a title. For instance here "apm" would end up as "Apm" where we want APM.
| <p><a href="${getUrlForCommit()}/composite">Composite Storybook</a></p> | ||
| <h2>All</h2> | ||
| <ul> | ||
| ${listHtml} |
There was a problem hiding this comment.
Do we need this page? What is the composite storybook missing that this gives us?
There was a problem hiding this comment.
I didn't want the links to the individual storybooks to be effectively hidden, so I built this index page to put in front of all of them. This seems particularly useful if you're only concerned about a particular storybook, because the composite takes a long time to load.
|
Thanks for kicking this off BTW! |
|
@elasticmachine merge upstream |
spalger
left a comment
There was a problem hiding this comment.
LGTM from an operations perspective
| .collect { it.replace('/', '') } | ||
| .findAll { it != 'composite' } | ||
|
|
||
| def listHtml = storybooks.collect { """<li><a href="${getUrlForCommit()}/${it}">${it}</a></li>""" }.join("\n") |
There was a problem hiding this comment.
I'm a tiny bit concerned about creating HTML with string concatenation, though our sources are pretty predictable it would be great if we could limit the character set to /[a-z\-_]/i or something
| ${storybooksMessage} | ||
| ${getDocsChangesLink()} |
There was a problem hiding this comment.
I will get this fixed. I didn't notice before because it only happens if it's not the last link in the list (e.g. when there's a flaky suite)
There was a problem hiding this comment.
Ahh, it's actually getDocsChangesLink() that's inserting a blank newline when it's missing. I can still get it fixed in this PR
There was a problem hiding this comment.
Yeah, my bad, makes sense. Thank you
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
|
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
# Conflicts: # src/dev/storybook/aliases.ts
* master: (111 commits) [Logs UI] Replace dependencies in the infra bundle (elastic#91503) [Search Source] Do not request unmapped fields if source filters are provided (elastic#91921) [APM] Kql Search Bar suggests values outside the selected time range (elastic#91918) Refactored component edit policy tests into separate folders and using client integration testing setup (elastic#91657) [Fleet] Don't error on missing package_assets value (elastic#91744) [Lens] Pass used histogram interval to chart (elastic#91370) [Indexpattern management] Use indexPatterns Service instead of savedObjects client (elastic#91839) [Security Solutions] Fixes Cypress tests for indicator match by making the selectors more specific (elastic#91947) [CI] backportrc can skip CI (elastic#91886) Revert "[SOM] fix flaky suites (elastic#91809)" [Fleet] Install Elastic Agent integration by default during setup (elastic#91676) [Fleet] Silently swallow 404 errors when deleting ingest pipelines (elastic#91778) [data.search] Use incrementCounter for search telemetry (elastic#91230) [Fleet] Bootstrap functional test suite (elastic#91898) [Alerts][Docs] Added API documentation for alerts plugin (elastic#91067) Use correct environment in anomaly detection setup link (elastic#91877) [FTSR] Convert to tasks and add jest/api integration suites (elastic#91770) [CI] Build and publish storybooks (elastic#87701) docs: add PHP agent info to docs (elastic#91773) [DOCS] Adds and updates Visualization advanced settings (elastic#91904) ...


Closes #58024
<branch>/latest/index.html, mainly so that tracked branches have a single URL that's always up-to-dateI'm focused mostly on getting the storybooks building and uploading somewhere in this PR. I expect people who know more about Storybooks will make further improvements (e.g. to the composite) in separate PRs.
Example index page: https://ci-artifacts.kibana.dev/storybooks/pr-87701/6c5dca53b671f41da26d6d73ea536e4f8f2de511/index.html
Link added to the PR comment:
which leads to a page that looks like this:
which links to each individual Storybook, as well as the composite. The link is unique for this commit.
And here's what the checks/statuses look like:
The details link on the finished status links directly to the index page.