From 8633f3d024c04d087ec733243dc7d53b2e6b46be Mon Sep 17 00:00:00 2001 From: Jason Jean Date: Wed, 17 Jul 2024 23:37:41 -0500 Subject: [PATCH] fix(misc): update concurrency in ci workflows to 3 (#26974) ## Current Behavior Generated CI Workflows use 5 agents. ## Expected Behavior Generated CI Workflows use 3 agents. ## Related Issue(s) Fixes # --- .../__snapshots__/generator.spec.ts.snap | 8 +- .../circleci/.circleci/config.yml.template | 4 +- .../__workflowFileName__.yml.template | 4 +- packages/nx/src/utils/package-manager.ts | 2 +- .../__snapshots__/ci-workflow.spec.ts.snap | 164 +++++++++--------- .../files/azure/azure-pipelines.yml__tmpl__ | 6 +- .../bitbucket-pipelines.yml__tmpl__ | 8 +- .../circleci/.circleci/config.yml__tmpl__ | 4 +- .../__workflowFileName__.yml__tmpl__ | 4 +- .../files/gitlab/.gitlab-ci.yml__tmpl__ | 4 +- 10 files changed, 104 insertions(+), 104 deletions(-) diff --git a/packages/gradle/src/generators/ci-workflow/__snapshots__/generator.spec.ts.snap b/packages/gradle/src/generators/ci-workflow/__snapshots__/generator.spec.ts.snap index 59a2bdca44b1d..6e00754488604 100644 --- a/packages/gradle/src/generators/ci-workflow/__snapshots__/generator.spec.ts.snap +++ b/packages/gradle/src/generators/ci-workflow/__snapshots__/generator.spec.ts.snap @@ -20,7 +20,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-jvm" --stop-agents-after="build" + - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-jvm" --stop-agents-after="build" - nx/set-shas: main-branch-name: 'main' @@ -61,7 +61,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-jvm" --stop-agents-after="build" + - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-jvm" --stop-agents-after="build" - name: Set up JDK 17 for x64 uses: actions/setup-java@v4 @@ -101,7 +101,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-jvm" --stop-agents-after="build" + # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-jvm" --stop-agents-after="build" - nx/set-shas: main-branch-name: 'main' @@ -143,7 +143,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-jvm" --stop-agents-after="build" + # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-jvm" --stop-agents-after="build" - name: Set up JDK 17 for x64 uses: actions/setup-java@v4 diff --git a/packages/gradle/src/generators/ci-workflow/files/circleci/.circleci/config.yml.template b/packages/gradle/src/generators/ci-workflow/files/circleci/.circleci/config.yml.template index d16d32fe8c9cd..f66de66d7a6e5 100644 --- a/packages/gradle/src/generators/ci-workflow/files/circleci/.circleci/config.yml.template +++ b/packages/gradle/src/generators/ci-workflow/files/circleci/.circleci/config.yml.template @@ -17,9 +17,9 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - <% if (connectedToCloud) { %>- run: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-jvm" --stop-agents-after="build" + <% if (connectedToCloud) { %>- run: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-jvm" --stop-agents-after="build" <% } else { %># Connect your workspace by running "nx connect" and uncomment this - # - run: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-jvm" --stop-agents-after="build" + # - run: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-jvm" --stop-agents-after="build" <% } %> - nx/set-shas: main-branch-name: '<%= mainBranch %>' diff --git a/packages/gradle/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml.template b/packages/gradle/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml.template index 83e5173865989..38d9a806ace84 100644 --- a/packages/gradle/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml.template +++ b/packages/gradle/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml.template @@ -21,9 +21,9 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - <% if (connectedToCloud) { %>- run: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-jvm" --stop-agents-after="build" + <% if (connectedToCloud) { %>- run: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-jvm" --stop-agents-after="build" <% } else { %># Connect your workspace by running "nx connect" and uncomment this - # - run: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-jvm" --stop-agents-after="build" + # - run: <%= packageManagerPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-jvm" --stop-agents-after="build" <% } %> - name: Set up JDK 17 for x64 diff --git a/packages/nx/src/utils/package-manager.ts b/packages/nx/src/utils/package-manager.ts index 5e62409f7f945..371a50083fe39 100644 --- a/packages/nx/src/utils/package-manager.ts +++ b/packages/nx/src/utils/package-manager.ts @@ -156,7 +156,7 @@ export function getPackageManagerCommand( return { install: 'npm install', - ciInstall: 'npm ci', + ciInstall: 'npm ci --legacy-peer-deps', updateLockFile: 'npm install --package-lock-only', add: 'npm install', addDev: 'npm install -D', diff --git a/packages/workspace/src/generators/ci-workflow/__snapshots__/ci-workflow.spec.ts.snap b/packages/workspace/src/generators/ci-workflow/__snapshots__/ci-workflow.spec.ts.snap index a2c0a2c772e02..2646ad13646e3 100644 --- a/packages/workspace/src/generators/ci-workflow/__snapshots__/ci-workflow.spec.ts.snap +++ b/packages/workspace/src/generators/ci-workflow/__snapshots__/ci-workflow.spec.ts.snap @@ -50,7 +50,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - script: bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - script: bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - script: bun install --no-cache - script: git branch --track main origin/main @@ -82,7 +82,7 @@ pipelines: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - bun install --no-cache @@ -99,7 +99,7 @@ pipelines: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - npm install --prefix=$HOME/.local -g bun @@ -132,7 +132,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - run: bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - run: bun install --no-cache - nx/set-shas: @@ -180,7 +180,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - run: bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - run: bun install --no-cache - uses: nrwl/nx-set-shas@v4 @@ -220,7 +220,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - run: bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - run: bun install --no-cache - uses: nrwl/nx-set-shas@v4 @@ -249,7 +249,7 @@ CI: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - bun install --no-cache - NX_HEAD=$CI_COMMIT_SHA @@ -309,9 +309,9 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - script: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - script: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - - script: npm ci + - script: npm ci --legacy-peer-deps - script: git branch --track main origin/main condition: eq(variables['Build.Reason'], 'PullRequest') @@ -339,9 +339,9 @@ pipelines: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - - npm ci + - npm ci --legacy-peer-deps - npx nx-cloud record -- nx format:check # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected @@ -356,9 +356,9 @@ pipelines: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - - npm ci + - npm ci --legacy-peer-deps # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # - npx nx-cloud record -- echo Hello World @@ -383,9 +383,9 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - - run: npm ci + - run: npm ci --legacy-peer-deps - nx/set-shas: main-branch-name: 'main' @@ -427,7 +427,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # Cache node_modules - uses: actions/setup-node@v3 @@ -435,7 +435,7 @@ jobs: node-version: 20 cache: 'npm' - - run: npm ci + - run: npm ci --legacy-peer-deps - uses: nrwl/nx-set-shas@v4 # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud @@ -469,7 +469,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # Cache node_modules - uses: actions/setup-node@v3 @@ -477,7 +477,7 @@ jobs: node-version: 20 cache: 'npm' - - run: npm ci + - run: npm ci --legacy-peer-deps - uses: nrwl/nx-set-shas@v4 # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud @@ -502,9 +502,9 @@ CI: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - - npm ci + - npm ci --legacy-peer-deps - NX_HEAD=$CI_COMMIT_SHA - NX_BASE=\${CI_MERGE_REQUEST_DIFF_BASE_SHA:-$CI_COMMIT_BEFORE_SHA} @@ -565,7 +565,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - script: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - script: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - script: pnpm install --frozen-lockfile - script: git branch --track main origin/main @@ -597,7 +597,7 @@ pipelines: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - pnpm install --frozen-lockfile @@ -614,7 +614,7 @@ pipelines: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - npm install --prefix=$HOME/.local -g pnpm@8 @@ -647,7 +647,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - run: pnpm install --frozen-lockfile - nx/set-shas: @@ -695,7 +695,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # Cache node_modules - uses: actions/setup-node@v3 @@ -741,7 +741,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # Cache node_modules - uses: actions/setup-node@v3 @@ -776,7 +776,7 @@ CI: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - pnpm install --frozen-lockfile - NX_HEAD=$CI_COMMIT_SHA @@ -836,7 +836,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - script: yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - script: yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - script: yarn install --frozen-lockfile - script: git branch --track main origin/main @@ -866,7 +866,7 @@ pipelines: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - yarn install --frozen-lockfile @@ -883,7 +883,7 @@ pipelines: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - yarn install --frozen-lockfile @@ -910,7 +910,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - run: yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - run: yarn install --frozen-lockfile - nx/set-shas: @@ -954,7 +954,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - run: yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # Cache node_modules - uses: actions/setup-node@v3 @@ -996,7 +996,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - run: yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - run: yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # Cache node_modules - uses: actions/setup-node@v3 @@ -1029,7 +1029,7 @@ CI: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + - yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - yarn install --frozen-lockfile - NX_HEAD=$CI_COMMIT_SHA @@ -1093,7 +1093,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - script: bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - script: bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - script: bun install --no-cache - script: git branch --track main origin/main @@ -1126,7 +1126,7 @@ pipelines: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - bun install --no-cache @@ -1144,7 +1144,7 @@ pipelines: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - npm install --prefix=$HOME/.local -g bun @@ -1178,7 +1178,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - run: bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - run: bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - run: bun install --no-cache - nx/set-shas: @@ -1227,7 +1227,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - run: bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - run: bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - run: bun install --no-cache - uses: nrwl/nx-set-shas@v4 @@ -1268,7 +1268,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - run: bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - run: bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - run: bun install --no-cache - uses: nrwl/nx-set-shas@v4 @@ -1298,7 +1298,7 @@ CI: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - bunx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - bunx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - bun install --no-cache - NX_HEAD=$CI_COMMIT_SHA @@ -1359,9 +1359,9 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - script: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - script: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - - script: npm ci + - script: npm ci --legacy-peer-deps - script: git branch --track main origin/main condition: eq(variables['Build.Reason'], 'PullRequest') @@ -1390,9 +1390,9 @@ pipelines: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - - npm ci + - npm ci --legacy-peer-deps - npx nx-cloud record -- nx format:check # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected @@ -1408,9 +1408,9 @@ pipelines: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - - npm ci + - npm ci --legacy-peer-deps # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # - npx nx-cloud record -- echo Hello World @@ -1436,9 +1436,9 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - - run: npm ci + - run: npm ci --legacy-peer-deps - nx/set-shas: main-branch-name: 'main' @@ -1481,7 +1481,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # Cache node_modules - uses: actions/setup-node@v3 @@ -1489,7 +1489,7 @@ jobs: node-version: 20 cache: 'npm' - - run: npm ci + - run: npm ci --legacy-peer-deps - uses: nrwl/nx-set-shas@v4 # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud @@ -1524,7 +1524,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - run: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - run: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # Cache node_modules - uses: actions/setup-node@v3 @@ -1532,7 +1532,7 @@ jobs: node-version: 20 cache: 'npm' - - run: npm ci + - run: npm ci --legacy-peer-deps - uses: nrwl/nx-set-shas@v4 # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud @@ -1558,9 +1558,9 @@ CI: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - - npm ci + - npm ci --legacy-peer-deps - NX_HEAD=$CI_COMMIT_SHA - NX_BASE=\${CI_MERGE_REQUEST_DIFF_BASE_SHA:-$CI_COMMIT_BEFORE_SHA} @@ -1622,7 +1622,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - script: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - script: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - script: pnpm install --frozen-lockfile - script: git branch --track main origin/main @@ -1655,7 +1655,7 @@ pipelines: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - pnpm install --frozen-lockfile @@ -1673,7 +1673,7 @@ pipelines: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - npm install --prefix=$HOME/.local -g pnpm@8 @@ -1707,7 +1707,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - run: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - run: pnpm install --frozen-lockfile - nx/set-shas: @@ -1756,7 +1756,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - run: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # Cache node_modules - uses: actions/setup-node@v3 @@ -1803,7 +1803,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - run: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - run: pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # Cache node_modules - uses: actions/setup-node@v3 @@ -1839,7 +1839,7 @@ CI: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - pnpm dlx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - pnpm install --frozen-lockfile - NX_HEAD=$CI_COMMIT_SHA @@ -1900,7 +1900,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - script: yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - script: yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - script: yarn install --frozen-lockfile - script: git branch --track main origin/main @@ -1931,7 +1931,7 @@ pipelines: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - yarn install --frozen-lockfile @@ -1949,7 +1949,7 @@ pipelines: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - yarn install --frozen-lockfile @@ -1977,7 +1977,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - run: yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - run: yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - run: yarn install --frozen-lockfile - nx/set-shas: @@ -2022,7 +2022,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - run: yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - run: yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # Cache node_modules - uses: actions/setup-node@v3 @@ -2065,7 +2065,7 @@ jobs: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - run: yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - run: yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" # Cache node_modules - uses: actions/setup-node@v3 @@ -2099,7 +2099,7 @@ CI: # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun # Connect your workspace by running "nx connect" and uncomment this - # - yarn nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" + # - yarn nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="build" - yarn install --frozen-lockfile - NX_HEAD=$CI_COMMIT_SHA @@ -2159,9 +2159,9 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - script: npx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="e2e-ci" + - script: npx nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="e2e-ci" - - script: npm ci + - script: npm ci --legacy-peer-deps - script: git branch --track main origin/main condition: eq(variables['Build.Reason'], 'PullRequest') @@ -2190,9 +2190,9 @@ pipelines: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - 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 + - npm ci --legacy-peer-deps - npx nx-cloud record -- nx format:check # Nx Affected runs only tasks affected by the changes in this PR/commit. Learn more: https://nx.dev/ci/features/affected @@ -2208,9 +2208,9 @@ pipelines: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - 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 + - npm ci --legacy-peer-deps # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud # - npx nx-cloud record -- echo Hello World @@ -2235,9 +2235,9 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - 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 + - run: npm ci --legacy-peer-deps - nx/set-shas: main-branch-name: 'main' @@ -2280,7 +2280,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - 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" # Cache node_modules - uses: actions/setup-node@v3 @@ -2288,7 +2288,7 @@ jobs: node-version: 20 cache: 'npm' - - run: npm ci + - run: npm ci --legacy-peer-deps - uses: nrwl/nx-set-shas@v4 # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud @@ -2323,7 +2323,7 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - - 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" # Cache node_modules - uses: actions/setup-node@v3 @@ -2331,7 +2331,7 @@ jobs: node-version: 20 cache: 'npm' - - run: npm ci + - run: npm ci --legacy-peer-deps - uses: nrwl/nx-set-shas@v4 # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud diff --git a/packages/workspace/src/generators/ci-workflow/files/azure/azure-pipelines.yml__tmpl__ b/packages/workspace/src/generators/ci-workflow/files/azure/azure-pipelines.yml__tmpl__ index 09087f88fe2b5..9dea2bb1fee51 100644 --- a/packages/workspace/src/generators/ci-workflow/files/azure/azure-pipelines.yml__tmpl__ +++ b/packages/workspace/src/generators/ci-workflow/files/azure/azure-pipelines.yml__tmpl__ @@ -51,13 +51,13 @@ jobs: displayName: Install Bun <% } %> - + # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - <% if (connectedToCloud) { %>- script: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" + <% if (connectedToCloud) { %>- script: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" <% } else { %># Connect your workspace by running "nx connect" and uncomment this - # - script: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" + # - script: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" <% } %> - script: <%= packageManagerInstall %> - script: git branch --track <%= mainBranch %> origin/<%= mainBranch %> diff --git a/packages/workspace/src/generators/ci-workflow/files/bitbucket-pipelines/bitbucket-pipelines.yml__tmpl__ b/packages/workspace/src/generators/ci-workflow/files/bitbucket-pipelines/bitbucket-pipelines.yml__tmpl__ index 4d91ce066fafa..56e3aeb0912cb 100644 --- a/packages/workspace/src/generators/ci-workflow/files/bitbucket-pipelines/bitbucket-pipelines.yml__tmpl__ +++ b/packages/workspace/src/generators/ci-workflow/files/bitbucket-pipelines/bitbucket-pipelines.yml__tmpl__ @@ -22,9 +22,9 @@ pipelines: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - <% if (connectedToCloud) { %>- <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" + <% if (connectedToCloud) { %>- <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" <% } else { %># Connect your workspace by running "nx connect" and uncomment this - # - <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" + # - <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" <% } %> - <%= packageManagerInstall %> @@ -42,9 +42,9 @@ pipelines: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - <% if (connectedToCloud) { %>- <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" + <% if (connectedToCloud) { %>- <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" <% } else { %># Connect your workspace by running "nx connect" and uncomment this - # - <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" + # - <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" <% } %> <% if(packageManager == 'pnpm'){ %> - npm install --prefix=$HOME/.local -g pnpm@8 diff --git a/packages/workspace/src/generators/ci-workflow/files/circleci/.circleci/config.yml__tmpl__ b/packages/workspace/src/generators/ci-workflow/files/circleci/.circleci/config.yml__tmpl__ index 89164ad1d3d6d..4da1af6afb1e1 100644 --- a/packages/workspace/src/generators/ci-workflow/files/circleci/.circleci/config.yml__tmpl__ +++ b/packages/workspace/src/generators/ci-workflow/files/circleci/.circleci/config.yml__tmpl__ @@ -24,9 +24,9 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - <% if (connectedToCloud) { %>- run: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" + <% if (connectedToCloud) { %>- run: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" <% } else { %># Connect your workspace by running "nx connect" and uncomment this - # - run: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" + # - run: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" <% } %> - run: <%= packageManagerInstall %> - nx/set-shas: diff --git a/packages/workspace/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml__tmpl__ b/packages/workspace/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml__tmpl__ index f7966d14f5c5f..167ae3964065a 100644 --- a/packages/workspace/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml__tmpl__ +++ b/packages/workspace/src/generators/ci-workflow/files/github/.github/workflows/__workflowFileName__.yml__tmpl__ @@ -31,9 +31,9 @@ jobs: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - <% if (connectedToCloud) { %>- run: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" + <% if (connectedToCloud) { %>- run: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" <% } else { %># Connect your workspace by running "nx connect" and uncomment this - # - run: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" + # - run: <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" <% } %> <% if(packageManager != 'bun'){ %> # Cache node_modules diff --git a/packages/workspace/src/generators/ci-workflow/files/gitlab/.gitlab-ci.yml__tmpl__ b/packages/workspace/src/generators/ci-workflow/files/gitlab/.gitlab-ci.yml__tmpl__ index c6e336e75712e..2e3ed78972d1d 100644 --- a/packages/workspace/src/generators/ci-workflow/files/gitlab/.gitlab-ci.yml__tmpl__ +++ b/packages/workspace/src/generators/ci-workflow/files/gitlab/.gitlab-ci.yml__tmpl__ @@ -18,9 +18,9 @@ variables: # This enables task distribution via Nx Cloud # Run this command as early as possible, before dependencies are installed # Learn more at https://nx.dev/ci/reference/nx-cloud-cli#npx-nxcloud-startcirun - <% if (connectedToCloud) { %>- <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" + <% if (connectedToCloud) { %>- <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" <% } else { %># Connect your workspace by running "nx connect" and uncomment this - # - <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" + # - <%= packageManagerPreInstallPrefix %> nx-cloud start-ci-run --distribute-on="3 linux-medium-js" --stop-agents-after="<% if(hasE2E){ %>e2e-ci<% } else { %>build<% } %>" <% } %> - <%= packageManagerInstall %> - NX_HEAD=$CI_COMMIT_SHA