Skip to content

Commit

Permalink
DX-335 - Prepare release #1 (deactivate release #2) (#38)
Browse files Browse the repository at this point in the history
* Link stoplight docs from resources

* Link meteor-icon-kit (external)

* Link shopware-frontends (external)

* Disable embeddings

* Skip non-released repos

* Skip non-embedded tests

* Skip external sidebars

* Skip additional steps check

* Update deps

* Skip non-embedded e2e tests

* Remove docs and plugins

* Deactivate Stoplight markdown generation

* Update menu test

* Remove externals
  • Loading branch information
bojanrajh authored Apr 3, 2023
1 parent c7513c5 commit d07c534
Show file tree
Hide file tree
Showing 14 changed files with 147 additions and 132 deletions.
56 changes: 28 additions & 28 deletions .github/scripts/embed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ fi
--dst docs/v6.3 \
--org ${ORG_DOCS_63:-shopware}

./docs-cli clone \
--ci \
--repository shopware/frontends \
--branch ${BRANCH_FRONTENDS:-main} \
--src apps/docs/src \
--dst frontends \
--org ${ORG_FRONTENDS:-shopware}
#./docs-cli clone \
# --ci \
# --repository shopware/frontends \
# --branch ${BRANCH_FRONTENDS:-main} \
# --src apps/docs/src \
# --dst frontends \
# --org ${ORG_FRONTENDS:-shopware}

#./docs-cli clone \
# --ci \
Expand All @@ -69,26 +69,26 @@ fi
# --dst frontends-gl \
# --git gitlab.shopware.com

./docs-cli clone \
--ci \
--repository shopware/admin-extension-sdk \
--branch ${BRANCH_ADMIN_EXTENSION_SDK:-main} \
--src docs/docs/guide \
--dst resources/admin-extension-sdk \
--org ${ORG_ADMIN_EXTENSION_SDK:-shopware}
#./docs-cli clone \
# --ci \
# --repository shopware/admin-extension-sdk \
# --branch ${BRANCH_ADMIN_EXTENSION_SDK:-main} \
# --src docs/docs/guide \
# --dst resources/admin-extension-sdk \
# --org ${ORG_ADMIN_EXTENSION_SDK:-shopware}

./docs-cli clone \
--ci \
--repository shopware/meteor-icon-kit \
--branch ${BRANCH_METEOR_ICON_KIT:-main} \
--src docs \
--dst resources/meteor-icon-kit \
--org ${ORG_METEOR_ICON_KIT:-shopware}
#./docs-cli clone \
# --ci \
# --repository shopware/meteor-icon-kit \
# --branch ${BRANCH_METEOR_ICON_KIT:-main} \
# --src docs \
# --dst resources/meteor-icon-kit \
# --org ${ORG_METEOR_ICON_KIT:-shopware}

./docs-cli clone \
--ci \
--repository shopware/meteor-component-library \
--branch ${BRANCH_METEOR_COMPONENT_LIBRARY:-main} \
--src docs \
--dst resources/meteor-component-library \
--org ${ORG_METEOR_COMPONENT_LIBRARY:-shopware}
#./docs-cli clone \
# --ci \
# --repository shopware/meteor-component-library \
# --branch ${BRANCH_METEOR_COMPONENT_LIBRARY:-main} \
# --src docs \
# --dst resources/meteor-component-library \
# --org ${ORG_METEOR_COMPONENT_LIBRARY:-shopware}
26 changes: 13 additions & 13 deletions .github/workflows/checkout-test-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ jobs:
export NODE_OPTIONS="--max-old-space-size=8096"
pnpm run build
- name: Zip externals
run: |
cd external && zip -r db-external.zip * -i '*.md'
#- name: Zip externals
# run: |
# cd external && zip -r db-external.zip * -i '*.md'

- name: Zip folder
run: zip -r full-build.zip .vitepress/dist/
Expand All @@ -176,12 +176,12 @@ jobs:
name: full-build-${{ github.sha }}
path: full-build.zip

- name: Upload external
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: db-external-${{ github.sha }}
path: external/db-external.zip
#- name: Upload external
# uses: actions/upload-artifact@v3
# with:
# if-no-files-found: error
# name: db-external-${{ github.sha }}
# path: external/db-external.zip

chromatic:
name: Deploy Storybook to Chromatic
Expand Down Expand Up @@ -263,15 +263,15 @@ jobs:
with:
name: db-index-${{ github.sha }}

- uses: actions/download-artifact@v3
with:
name: db-external-${{ github.sha }}
#- uses: actions/download-artifact@v3
# with:
# name: db-external-${{ github.sha }}

- name: Merge base and external sources
run: |
mkdir merged
unzip -o db-index.zip -d merged
unzip -o db-external.zip -d merged
true || unzip -o db-external.zip -d merged
zip -r db-merged.zip merged/
- name: Send artifact
Expand Down
14 changes: 7 additions & 7 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default defineConfigWithTheme<ThemeConfig>({
/**
* Fetch Stoplight URLs.
*/
const stoplightUrls = [
/*const stoplightUrls = [
...await getStoplightUrls({
source: 'https://shopware.stoplight.io/api/v1/projects/cHJqOjEwNjA0NQ/table-of-contents',
prefix: '/resources/api/store-api-reference.html#/',
Expand All @@ -146,31 +146,31 @@ export default defineConfigWithTheme<ThemeConfig>({
source: 'https://shopware.stoplight.io/api/v1/projects/cHJqOjEwNjA0Mw/table-of-contents',
prefix: '/resources/api/admin-api-reference.html#/',
}),
];
];*/

/**
* Create public sitemap.xml.
*/
await createSitemap(stoplightUrls);
await createSitemap(/*stoplightUrls*/);

/**
* Transform Store API JSON reference to Markdown for Knowledge base.
*/
await generateMarkdownFromStoplight({
/*await generateMarkdownFromStoplight({
source: 'https://shopware.stoplight.io/api/v1/projects/cHJqOjEwNjA0NQ/table-of-contents',
nodes: 'https://shopware.stoplight.io/api/v1/workspaces/d2s6MzM5MTQ/nodes?project_ids[0]=cHJqOjEwNjA0NQ',
reference: 'https://raw.githubusercontent.com/shopware/store-api-reference/main/storeapi.json',
as: 'resources/api/admin-api-reference.html',
});
});*/

/**
* Transform Admin API JSON reference to Markdown for Knowledge base.
*/
await generateMarkdownFromStoplight({
/*await generateMarkdownFromStoplight({
source: 'https://shopware.stoplight.io/api/v1/projects/cHJqOjEwNjA0Mw/table-of-contents',
nodes: 'https://shopware.stoplight.io/api/v1/workspaces/d2s6MzM5MTQ/nodes?project_ids[0]=cHJqOjEwNjA0Mw',
reference: 'https://raw.githubusercontent.com/shopware/admin-api-reference/main/storeapi.json',
as: 'resources/api/store-api-reference.html',
}, false);
}, false);*/
}
});
24 changes: 10 additions & 14 deletions .vitepress/navigation.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import {buildSidebarNav} from "../node_modules/vitepress-shopware-docs/src/core/composables/Sidebar";

const navigation = buildSidebarNav('./src/', [
{
link: '/docs/',
text: 'Docs',
},
{
// link: '/apps/',
link: '/docs/guides/plugins/apps/',
Expand All @@ -16,11 +12,8 @@ const navigation = buildSidebarNav('./src/', [
text: 'Themes',
},
{
link: '/docs/guides/plugins/plugins/',
text: 'Plugins',
},
{
link: '/frontends/',
//link: '/frontends/',
link: 'https://shopware-frontends-docs.vercel.app/',
text: 'Frontends',
repo: 'shopware/frontends',
},
Expand All @@ -37,12 +30,14 @@ const navigation = buildSidebarNav('./src/', [
items: [
{
text: "Store API",
link: "/resources/api/store-api-reference",
// link: "/resources/api/store-api-reference",
link: 'https://shopware.stoplight.io/docs/store-api/',
repo: 'shopware/store-api-reference',
},
{
text: "Admin API",
link: "/resources/api/admin-api-reference",
//link: "/resources/api/admin-api-reference",
link: 'https://shopware.stoplight.io/docs/admin-api/',
repo: 'shopware/admin-api-reference',
}
]
Expand All @@ -57,7 +52,8 @@ const navigation = buildSidebarNav('./src/', [
},
{
text: "Meteor Icon Kit",
link: "/resources/meteor-icon-kit/",
//link: "/resources/meteor-icon-kit/",
link: 'https://shopware.github.io/meteor-icon-kit/',
repo: 'shopware/meteor-icon-kit',
},
{
Expand Down Expand Up @@ -86,8 +82,8 @@ const navigation = buildSidebarNav('./src/', [
'/docs/',
'/docs/v6.4/',
'/docs/v6.3/',
'/resources/admin-extension-sdk/',
'/resources/meteor-component-library/',
//'/resources/admin-extension-sdk/',
//'/resources/meteor-component-library/',
'/apps/', // custom, tmp!
]);

Expand Down
22 changes: 13 additions & 9 deletions __tests__/cli/command/embed.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,23 @@ describe('cli embed', async () => {

expect(result.stdout).toContain('Embedding repositories');

expect(result.stdout).toContain('Embedding shopware/frontends');
expect(result.stdout).toContain('Processed shopware/frontends');
expect(result.stdout).toContain('Embedding shopware/docs');
expect(result.stdout).toContain('Processed shopware/docs');

expect(result.stdout).toContain('Embedding shopware/admin-extension-sdk');
expect(result.stdout).toContain('Processed shopware/admin-extension-sdk');
//expect(result.stdout).toContain('Embedding shopware/frontends');
//expect(result.stdout).toContain('Processed shopware/frontends');

expect(result.stdout).toContain('Embedding shopware/meteor-icon-kit');
expect(result.stdout).toContain('Processed shopware/meteor-icon-kit');
//expect(result.stdout).toContain('Embedding shopware/admin-extension-sdk');
//expect(result.stdout).toContain('Processed shopware/admin-extension-sdk');

expect(result.stdout).toContain('Embedding shopware/meteor-component-library');
expect(result.stdout).toContain('Processed shopware/meteor-component-library');
//expect(result.stdout).toContain('Embedding shopware/meteor-icon-kit');
//expect(result.stdout).toContain('Processed shopware/meteor-icon-kit');

//expect(result.stdout).toContain('Embedding shopware/meteor-component-library');
//expect(result.stdout).toContain('Processed shopware/meteor-component-library');

//expect(result.stdout).toContain('Running additional steps');

expect(result.stdout).toContain('Running additional steps');
expect(result.stdout).toContain('Repositories embedded');
// long-running
}, timeout.high.timeout);
Expand Down
2 changes: 1 addition & 1 deletion __tests__/e2e/admin-extension-sdk/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Embedded} from "../page-objects/embedded";

describe('render correct content', async () => {
describe.skip('render correct content', async () => {
let embeddedPage: Embedded;

beforeAll(async () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/e2e/frontends/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Embedded} from "../page-objects/embedded";

describe('render correct content', async () => {
describe.skip('render correct content', async () => {
let embeddedPage: Embedded;

beforeAll(async () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/e2e/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('render correct content', async () => {
test('navigation', async() => {
const navBarLocator = page.locator('.VPNavBarMenu > .VPNavBarMenuLink');
const links = await navBarLocator.allTextContents()
expect(links).toEqual(['Docs', 'Apps', 'Themes', 'Plugins', 'Frontends', 'Integrations'])
expect(links).toEqual(['Apps', 'Themes', 'Frontends', 'Integrations'])

const subNavBarLocator = page.locator('.VPNavBarMenu > .VPNavBarMenuGroup .vt-flyout-button-text');
const groupLinks = await subNavBarLocator.allTextContents()
Expand Down
2 changes: 1 addition & 1 deletion __tests__/e2e/meteor-component-library/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Embedded} from "../page-objects/embedded";

describe('render correct content', async () => {
describe.skip('render correct content', async () => {
let embeddedPage: Embedded;

beforeAll(async () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/e2e/meteor-icon-kit/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Embedded} from "../page-objects/embedded";
import {eachLocator} from "../utils/locator";

describe('render correct content', async () => {
describe.skip('render correct content', async () => {
let embeddedPage: Embedded;
const fourOhFour = [];

Expand Down
4 changes: 4 additions & 0 deletions cli/src/commands/embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ export default {
continue;
}

if (!configure && repo.skip) {
continue;
}

output.notice(`Processing ${repo.name}`);
await cloneCustom(repo, configure, ci);
}
Expand Down
5 changes: 5 additions & 0 deletions cli/src/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const repositories = [
dst: 'frontends',
branch: env.BRANCH_FRONTENDS || 'main',
org: env.ORG_FRONTENDS || 'shopware',
skip: true,
},
{
name: 'gitlab.shopware.com/product/engineering/platform-group/pwa/frontends',
Expand All @@ -45,13 +46,15 @@ export const repositories = [
description: 'GitLab deploy key'
},
},
skip: true,
},
{
name: 'shopware/admin-extension-sdk',
src: 'docs/docs/guide',
dst: 'resources/admin-extension-sdk',
branch: env.BRANCH_ADMIN_EXTENSION_SDK || 'DX-223' || 'main',
org: env.ORG_ADMIN_EXTENSION_SDK || 'shopware',
skip: true,
},
{
name: 'shopware/meteor-icon-kit',
Expand All @@ -67,12 +70,14 @@ export const repositories = [
description: 'Figma API key'
},
},
skip: true,
},
{
name: 'shopware/meteor-component-library',
src: 'docs',
dst: 'resources/meteor-component-library',
branch: env.BRANCH_METEOR_COMPONENT_LIBRARY || 'DX-231' || 'main',
org: env.ORG_METEOR_COMPONENT_LIBRARY || 'bojanrajh',
skip: true,
}
];
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dependencies": {
"terser": "^5.16.6",
"vitepress": "1.0.0-alpha.63",
"vitepress-shopware-docs": "0.3.0-beta.36",
"vitepress-shopware-docs": "0.3.0-beta.37",
"vue": "^3.2.47"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit d07c534

Please sign in to comment.