From f08cd4cae367aa2daa227af8cc40778ab3f24be3 Mon Sep 17 00:00:00 2001 From: Jason Jean Date: Mon, 22 Jul 2024 08:46:19 -0500 Subject: [PATCH] docs(misc): lower concurrency to 3 in the docs (#27013) ## Current Behavior This was changed in the generated ci workflow but not on the docs. ## Expected Behavior This is changed in the docs as well so it's not confusing. ## Related Issue(s) Fixes # --- docs/blog/2024-03-21-reliable-ci.md | 2 +- docs/nx-cloud/reference/nx-cloud-cli.md | 2 +- docs/nx-cloud/tutorial/circle.md | 6 +++--- docs/nx-cloud/tutorial/github-actions.md | 4 ++-- docs/shared/monorepo-ci-azure.md | 2 +- docs/shared/monorepo-ci-bitbucket-pipelines.md | 4 ++-- docs/shared/monorepo-ci-circle-ci.md | 2 +- docs/shared/monorepo-ci-github-actions.md | 2 +- docs/shared/monorepo-ci-gitlab.md | 2 +- docs/shared/monorepo-ci-jenkins.md | 4 ++-- 10 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/blog/2024-03-21-reliable-ci.md b/docs/blog/2024-03-21-reliable-ci.md index be44eae93d8d5..5e93188c65e1d 100644 --- a/docs/blog/2024-03-21-reliable-ci.md +++ b/docs/blog/2024-03-21-reliable-ci.md @@ -103,7 +103,7 @@ Nx Cloud introduces an entirely different model. Instead of the graph of VMs, th By adding the following lineā€¦ ```shell -npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" +npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" ``` ... you are telling Nx Cloud to create five Nx Agents to execute all the tasks from all the commands that will follow. diff --git a/docs/nx-cloud/reference/nx-cloud-cli.md b/docs/nx-cloud/reference/nx-cloud-cli.md index 671e5bb9d1ffe..a2a5af7d2f238 100644 --- a/docs/nx-cloud/reference/nx-cloud-cli.md +++ b/docs/nx-cloud/reference/nx-cloud-cli.md @@ -21,7 +21,7 @@ Tells Nx Cloud how many agents to use (and what launch templates to use) to dist using the `linux-medium-js` launch template. You can use different types of launch templates as follows: -`npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js, 3 linux-large-js"`. +`npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js, 3 linux-large-js"`. You can also define the configuration in a file and reference it as follows: `npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"`. diff --git a/docs/nx-cloud/tutorial/circle.md b/docs/nx-cloud/tutorial/circle.md index d98492c6da0bc..c84f9f9be93f6 100644 --- a/docs/nx-cloud/tutorial/circle.md +++ b/docs/nx-cloud/tutorial/circle.md @@ -101,7 +101,7 @@ jobs: # Connect your workspace on nx.app and uncomment this to enable task distribution. # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested - # - run: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" + # - run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci" - run: pnpm install --frozen-lockfile - nx/set-shas: @@ -233,12 +233,12 @@ To enable Nx Agents, make sure the following line is uncommented in the `.circle ```yml {% fileName=".circleci/config.yml" highlightLines=[3] %} # Connect your workspace on nx.app and uncomment this to enable task distribution. # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested -- run: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" +- run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci" ``` We recommend you add this line right after you check out the repo, before installing node modules. -- `nx-cloud start-ci-run --distribute-on="5 linux-medium-js` lets Nx know that all the tasks after this line should using Nx Agents and that Nx Cloud should use 5 instances of the `linux-medium-js` launch template. See the separate reference on how to [configure a custom launch template](/ci/reference/launch-templates). +- `nx-cloud start-ci-run --distribute-on="3 linux-medium-js` lets Nx know that all the tasks after this line should using Nx Agents and that Nx Cloud should use 5 instances of the `linux-medium-js` launch template. See the separate reference on how to [configure a custom launch template](/ci/reference/launch-templates). - `--stop-agents-after="e2e-ci"` lets Nx Cloud know which line is the last command in this pipeline. Once there are no more e2e tasks for an agent to run, Nx Cloud will automatically shut them down. This way you're not wasting money on idle agents while a particularly long e2e task is running on a single agent. Try it out by creating a new PR with the above changes. diff --git a/docs/nx-cloud/tutorial/github-actions.md b/docs/nx-cloud/tutorial/github-actions.md index 3d8b2646e59d9..7a4a0713bf923 100644 --- a/docs/nx-cloud/tutorial/github-actions.md +++ b/docs/nx-cloud/tutorial/github-actions.md @@ -200,12 +200,12 @@ To enable Nx Agents, make sure the following line is uncommented in the `.github ```yml {% fileName=".github/workflows/ci.yml" highlightLines=[3] %} # Connect your workspace on nx.app and uncomment this to enable task distribution. # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested -- run: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" +- run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci" ``` We recommend you add this line right after you check out the repo, before installing node modules. -- `nx-cloud start-ci-run --distribute-on="5 linux-medium-js` lets Nx know that all the tasks after this line should using Nx Agents and that Nx Cloud should use 5 instances of the `linux-medium-js` launch template. See the separate reference on how to [configure a custom launch template](/ci/reference/launch-templates). +- `nx-cloud start-ci-run --distribute-on="3 linux-medium-js` lets Nx know that all the tasks after this line should using Nx Agents and that Nx Cloud should use 5 instances of the `linux-medium-js` launch template. See the separate reference on how to [configure a custom launch template](/ci/reference/launch-templates). - `--stop-agents-after="e2e-ci"` lets Nx Cloud know which line is the last command in this pipeline. Once there are no more e2e tasks for an agent to run, Nx Cloud will automatically shut them down. This way you're not wasting money on idle agents while a particularly long e2e task is running on a single agent. Try it out by creating a new PR with the above changes. diff --git a/docs/shared/monorepo-ci-azure.md b/docs/shared/monorepo-ci-azure.md index f04428b71e9be..84a44790e78ec 100644 --- a/docs/shared/monorepo-ci-azure.md +++ b/docs/shared/monorepo-ci-azure.md @@ -48,7 +48,7 @@ jobs: # Connect your workspace on nx.app and uncomment this to enable task distribution. # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested - # - script: yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" + # - script: yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci" - script: yarn install --frozen-lockfile - script: git branch --track main origin/main diff --git a/docs/shared/monorepo-ci-bitbucket-pipelines.md b/docs/shared/monorepo-ci-bitbucket-pipelines.md index f645b6209b670..fb402431886e3 100644 --- a/docs/shared/monorepo-ci-bitbucket-pipelines.md +++ b/docs/shared/monorepo-ci-bitbucket-pipelines.md @@ -16,7 +16,7 @@ pipelines: script: # This line enables distribution # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested - - npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" + - npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci" - npm ci - npx nx-cloud record -- nx format:check @@ -30,7 +30,7 @@ pipelines: - export NX_BRANCH=$BITBUCKET_BRANCH # This line enables distribution # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested - # - npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" + # - npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci" - npm ci - npx nx-cloud record -- nx format:check diff --git a/docs/shared/monorepo-ci-circle-ci.md b/docs/shared/monorepo-ci-circle-ci.md index 33ef01e2f8593..a0dc7166ea853 100644 --- a/docs/shared/monorepo-ci-circle-ci.md +++ b/docs/shared/monorepo-ci-circle-ci.md @@ -16,7 +16,7 @@ jobs: - checkout # This line enables distribution # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested - # - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" + # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci" - run: npm ci - nx/set-shas diff --git a/docs/shared/monorepo-ci-github-actions.md b/docs/shared/monorepo-ci-github-actions.md index 36483191dc1d6..dcbb8080aa6f8 100644 --- a/docs/shared/monorepo-ci-github-actions.md +++ b/docs/shared/monorepo-ci-github-actions.md @@ -29,7 +29,7 @@ jobs: cache: 'npm' # This line enables distribution # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested - # - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" + # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci" - run: npm ci - uses: nrwl/nx-set-shas@v4 diff --git a/docs/shared/monorepo-ci-gitlab.md b/docs/shared/monorepo-ci-gitlab.md index 158eef6abcb5d..33e5cc33cf03d 100644 --- a/docs/shared/monorepo-ci-gitlab.md +++ b/docs/shared/monorepo-ci-gitlab.md @@ -22,7 +22,7 @@ main: script: # Connect your workspace on <%= nxCloudHost %> and uncomment this to enable task distribution. # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested - # - npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" + # - npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci" - npm ci --cache .npm --prefer-offline - NX_HEAD=$CI_COMMIT_SHA diff --git a/docs/shared/monorepo-ci-jenkins.md b/docs/shared/monorepo-ci-jenkins.md index 4ecf122b723d4..737a4461ef1a3 100644 --- a/docs/shared/monorepo-ci-jenkins.md +++ b/docs/shared/monorepo-ci-jenkins.md @@ -19,7 +19,7 @@ pipeline { steps { // This line enables distribution // The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested - // sh "npx nx-cloud start-ci-run --distribute-on='5 linux-medium-js' --stop-agents-after='e2e-ci'" + // sh "npx nx-cloud start-ci-run --distribute-on='3 linux-medium-js' --stop-agents-after='e2e-ci'" sh "npm ci" sh "npx nx-cloud record -- nx format:check" sh "npx nx affected --base=HEAD~1 -t lint test build e2e-ci" @@ -33,7 +33,7 @@ pipeline { steps { // This line enables distribution // The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e-ci" targets have been requested - // sh "npx nx-cloud start-ci-run --distribute-on='5 linux-medium-js' --stop-agents-after='e2e-ci'" + // sh "npx nx-cloud start-ci-run --distribute-on='3 linux-medium-js' --stop-agents-after='e2e-ci'" sh "npm ci" sh "npx nx-cloud record -- nx format:check" sh "npx nx affected --base origin/${env.CHANGE_TARGET} -t lint test build e2e-ci"