Skip to content

Commit

Permalink
[7.17] Remove CI Composite Storybook (#171258) (#171762)
Browse files Browse the repository at this point in the history
# Backport

Manual backport due to merge conflicts.

This will backport the following commits from `main` to `7.17`:
- [Remove CI Composite Storybook
(#171258)](#171258)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Brad
White","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-11-21T21:59:39Z","message":"Remove
CI Composite Storybook (#171258)\n\n## Summary\r\nCloses
#160803\r\n\r\nThis PR removes the `CI Composite` story because it has
been broken\r\nsince at least ac23dce
(and possibly\r\nsince b862a6c). The
functionality is\r\ncovered by the generated `index.html`
in\r\nhttps://github.com/elastic/kibana/blob/dda4498fee84708143ce4671af880db785f9e652/.buildkite/scripts/steps/storybooks/build_and_upload.ts#L105-L120\r\n\r\nTo
fix the composite story requires generating `stories.json` for
every\r\nstorybook, which requires migrating the repo off the
deprecated\r\n`storiesOf` API. That task is quite extensive and would be
better\r\nhandled alongside an upgrade to Storybook
7.x","sha":"1919c87b90c4f489c2027d71293631d89034f40f","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","ci:build-storybooks","v8.12.0"],"number":171258,"url":"https://github.com/elastic/kibana/pull/171258","mergeCommit":{"message":"Remove
CI Composite Storybook (#171258)\n\n## Summary\r\nCloses
#160803\r\n\r\nThis PR removes the `CI Composite` story because it has
been broken\r\nsince at least ac23dce
(and possibly\r\nsince b862a6c). The
functionality is\r\ncovered by the generated `index.html`
in\r\nhttps://github.com/elastic/kibana/blob/dda4498fee84708143ce4671af880db785f9e652/.buildkite/scripts/steps/storybooks/build_and_upload.ts#L105-L120\r\n\r\nTo
fix the composite story requires generating `stories.json` for
every\r\nstorybook, which requires migrating the repo off the
deprecated\r\n`storiesOf` API. That task is quite extensive and would be
better\r\nhandled alongside an upgrade to Storybook
7.x","sha":"1919c87b90c4f489c2027d71293631d89034f40f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/171258","number":171258,"mergeCommit":{"message":"Remove
CI Composite Storybook (#171258)\n\n## Summary\r\nCloses
#160803\r\n\r\nThis PR removes the `CI Composite` story because it has
been broken\r\nsince at least ac23dce
(and possibly\r\nsince b862a6c). The
functionality is\r\ncovered by the generated `index.html`
in\r\nhttps://github.com/elastic/kibana/blob/dda4498fee84708143ce4671af880db785f9e652/.buildkite/scripts/steps/storybooks/build_and_upload.ts#L105-L120\r\n\r\nTo
fix the composite story requires generating `stories.json` for
every\r\nstorybook, which requires migrating the repo off the
deprecated\r\n`storiesOf` API. That task is quite extensive and would be
better\r\nhandled alongside an upgrade to Storybook
7.x","sha":"1919c87b90c4f489c2027d71293631d89034f40f"}},{"url":"https://github.com/elastic/kibana/pull/171695","number":171695,"branch":"8.11","state":"OPEN"}]}]
BACKPORT-->

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
2 people authored and kc13greiner committed Nov 27, 2023
1 parent 5032514 commit ae62124
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 35 deletions.
7 changes: 1 addition & 6 deletions .buildkite/scripts/steps/storybooks/build_and_upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const STORYBOOKS = [
'apm',
'canvas',
'codeeditor',
'ci_composite',
'custom_integrations',
'url_template_editor',
'dashboard',
Expand Down Expand Up @@ -74,14 +73,12 @@ const upload = () => {
console.log('--- Generating Storybooks HTML');

process.chdir(path.join('.', 'built_assets', 'storybook'));
fs.renameSync('ci_composite', 'composite');

const storybooks = execSync(`ls -1d */`)
.toString()
.trim()
.split('\n')
.map((path) => path.replace('/', ''))
.filter((path) => path !== 'composite');
.map((filePath) => filePath.replace('/', ''));

const listHtml = storybooks
.map((storybook) => `<li><a href="${STORYBOOK_BASE_URL}/${storybook}">${storybook}</a></li>`)
Expand All @@ -91,8 +88,6 @@ const upload = () => {
<html>
<body>
<h1>Storybooks</h1>
<p><a href="${STORYBOOK_BASE_URL}/composite">Composite Storybook</a></p>
<h2>All</h2>
<ul>
${listHtml}
</ul>
Expand Down
28 changes: 0 additions & 28 deletions .ci/.storybook/main.js

This file was deleted.

1 change: 0 additions & 1 deletion src/dev/storybook/aliases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const storybookAliases = {
apm: 'x-pack/plugins/apm/.storybook',
canvas: 'x-pack/plugins/canvas/storybook',
codeeditor: 'src/plugins/kibana_react/public/code_editor/.storybook',
ci_composite: '.ci/.storybook',
custom_integrations: 'src/plugins/custom_integrations/storybook',
url_template_editor: 'src/plugins/kibana_react/public/url_template_editor/.storybook',
dashboard: 'src/plugins/dashboard/.storybook',
Expand Down

0 comments on commit ae62124

Please sign in to comment.