Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build: Run verdaccio on 6001 to enable web UI #18983

Merged
merged 1 commit into from
Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@ jobs:
name: running local registry
command: |
cd code
yarn local-registry --port 6000 --open
yarn local-registry --port 6001 --open
background: true
- run:
name: Wait for registry
command: |
cd code
yarn wait-on http://localhost:6000
yarn wait-on http://localhost:6001
- run:
name: Run E2E (extended) tests
command: |
Expand All @@ -225,13 +225,13 @@ jobs:
name: Running local registry
command: |
cd code
yarn local-registry --port 6000 --open
yarn local-registry --port 6001 --open
background: true
- run:
name: Wait for registry
command: |
cd code
yarn wait-on http://localhost:6000
yarn wait-on http://localhost:6001
- run:
name: Run E2E (core) tests
# Do not test CRA here because it's done in PnP part
Expand Down Expand Up @@ -265,11 +265,11 @@ jobs:
# at: .
# - run:
# name: Running local registry
# command: yarn local-registry --port 6000 --open
# command: yarn local-registry --port 6001 --open
# background: true
# - run:
# name: Wait for registry
# command: yarn wait-on http://localhost:6000
# command: yarn wait-on http://localhost:6001
# - run:
# name: Run smoke tests
# command: yarn test:e2e-framework angular_modern_inline_rendering --test-runner --docs-mode
Expand All @@ -293,13 +293,13 @@ jobs:
name: Running local registry
command: |
cd code
yarn local-registry --port 6000 --open
yarn local-registry --port 6001 --open
background: true
- run:
name: Wait for registry
command: |
cd code
yarn wait-on http://localhost:6000
yarn wait-on http://localhost:6001
- run:
name: set up cra repro, skip tests
command: |
Expand All @@ -324,13 +324,13 @@ jobs:
name: Running local registry
command: |
cd code
yarn local-registry --port 6000 --open
yarn local-registry --port 6001 --open
background: true
- run:
name: Wait for registry
command: |
cd code
yarn wait-on http://localhost:6000
yarn wait-on http://localhost:6001
- run:
name: run e2e tests cra
command: |
Expand Down
2 changes: 1 addition & 1 deletion code/lib/cli/src/repro-generators/scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const installYarn2 = async ({ cwd, pnp, name }: Options) => {
const configureYarn2ForE2E = async ({ cwd }: Options) => {
const command = [
// ⚠️ Need to set registry because Yarn 2 is not using the conf of Yarn 1 (URL is hardcoded in CircleCI config.yml)
`yarn config set npmScopes --json '{ "storybook": { "npmRegistryServer": "http://localhost:6000/" } }'`,
`yarn config set npmScopes --json '{ "storybook": { "npmRegistryServer": "http://localhost:6001/" } }'`,
// Some required magic to be able to fetch deps from local registry
`yarn config set unsafeHttpWhitelist --json '["localhost"]'`,
// Disable fallback mode to make sure everything is required correctly
Expand Down
2 changes: 1 addition & 1 deletion code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"lint:md": "remark -q .",
"lint:other": "prettier --write '**/*.{css,html,json,md,yml}'",
"lint:package": "sort-package-json",
"local-registry": "ts-node --project=../scripts/tsconfig.json ../scripts/run-registry.ts --port 6000",
"local-registry": "ts-node --project=../scripts/tsconfig.json ../scripts/run-registry.ts --port 6001",
"publish-repros": "ts-node ../scripts/next-repro-generators/publish.ts",
"publish:debug": "npm run publish:latest -- --npm-tag=debug --no-push",
"publish:latest": "lerna publish --exact --concurrency 1 --force-publish",
Expand Down
2 changes: 1 addition & 1 deletion docs/contribute/code.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Unit tests ensure that Storybook doesn't break accidentally. If your code can re
Storybook's monorepo is set up to rely on end-to-end testing with [Cypress](https://www.cypress.io/) during CI. To help with testing, we encourage running this test suite before submitting your contribution. Detailed below are some steps you can take:

1. Ensure you have Storybook successfully built in your local branch (i.e., run `yarn bootstrap --core`)
2. Open a terminal and run `yarn local-registry --port 6000 --open --publish` to publish Storybook's packages into a local registry.
2. Open a terminal and run `yarn local-registry --port 6001 --open --publish` to publish Storybook's packages into a local registry.
3. In a second terminal, set up a reproduction using the local registry and run the Cypress tests with `yarn test:e2e-framework`.

## Submit a pull request
Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ function run() {
defaultValue: false,
option: '--reg',
command: () => {
spawn('yarn local-registry --publish --open --port 6000');
spawn('yarn local-registry --publish --open --port 6001');
},
order: 11,
}),
Expand Down
2 changes: 1 addition & 1 deletion scripts/next-repro-generators/generate-repros.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const sbInit = async (cwd: string) => {
await runCommand(`${sbCliBinaryPath} init --yes`, { cwd, env });
};

const LOCAL_REGISTRY_URL = 'http://localhost:6000';
const LOCAL_REGISTRY_URL = 'http://localhost:6001';
const withLocalRegistry = async (packageManager: JsPackageManager, action: () => Promise<void>) => {
const prevUrl = packageManager.getRegistryURL();
try {
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const runTests = async ({ name, ...rest }: Parameters) => {
targetFolder,
`--renderer ${options.renderer}`,
`--template ${options.name}`,
`--registry http://localhost:6000`,
`--registry http://localhost:6001`,
'--e2e',
];

Expand Down
2 changes: 1 addition & 1 deletion scripts/run-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const startVerdaccio = (port: number): Promise<any> => {
});
};

startVerdaccioServer(config, 6000, cache, '1.0.0', 'verdaccio', onReady);
startVerdaccioServer(config, 6001, cache, '1.0.0', 'verdaccio', onReady);
}),
new Promise((_, rej) => {
setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/serve-packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function servePackages({ dryRun, debug }: { dryRun?: boolean; debug
// If aborted, we want to make sure the rejection is handled.
if (!err.killed) throw err;
});
await exec('yarn wait-on http://localhost:6000', { cwd: codeDir }, { dryRun, debug });
await exec('yarn wait-on http://localhost:6001', { cwd: codeDir }, { dryRun, debug });

return controller;
}
2 changes: 1 addition & 1 deletion scripts/utils/yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const configureYarn2ForVerdaccio = async ({ cwd, dryRun, debug }: YarnOpt
`yarn config set enableGlobalCache false`,
`yarn config set enableMirror false`,
// ⚠️ Need to set registry because Yarn 2 is not using the conf of Yarn 1 (URL is hardcoded in CircleCI config.yml)
`yarn config set npmScopes --json '{ "storybook": { "npmRegistryServer": "http://localhost:6000/" } }'`,
`yarn config set npmScopes --json '{ "storybook": { "npmRegistryServer": "http://localhost:6001/" } }'`,
// Some required magic to be able to fetch deps from local registry
`yarn config set unsafeHttpWhitelist --json '["localhost"]'`,
// Disable fallback mode to make sure everything is required correctly
Expand Down