From 6a26b69c088db721a967c33f1ab399a9b82a73be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Jona=C5=A1?= Date: Thu, 23 Jun 2022 12:15:09 +0200 Subject: [PATCH] feat(main): add NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT support (#16) --- .github/workflows/nx-cloud-main.yml | 4 ++++ README.md | 8 ++++++++ package.json | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nx-cloud-main.yml b/.github/workflows/nx-cloud-main.yml index 30aaccf..78af667 100644 --- a/.github/workflows/nx-cloud-main.yml +++ b/.github/workflows/nx-cloud-main.yml @@ -3,6 +3,9 @@ name: Nx Cloud Main on: workflow_call: inputs: + number-of-agents: + required: false + type: number init-commands: required: false type: string @@ -42,6 +45,7 @@ on: env: NX_CLOUD_DISTRIBUTED_EXECUTION: true + NX_CLOUD_DISTRIBUTED_EXECUTION_AGENT_COUNT: ${{ inputs.number-of-agents }} NX_BRANCH: ${{ github.event.number || github.ref_name }} jobs: diff --git a/README.md b/README.md index eb7b33a..52ad0bb 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,14 @@ jobs: ```yaml - uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.3 with: + # [OPTIONAL] The available number of agents used by the Nx Cloud to distribute tasks in parallel. + # By default, NxCloud tries to infer dynamically how many agents you have available. Some agents + # can have delayed start leading to incorrect count when distributing tasks. + # + # If you know exactly how many agents you have available, it is recommended to set this so we can more + # reliably distribute the tasks. + number-of-agents: 3 + # [OPTIONAL] A multi-line string representing any bash commands (separated by new lines) which should # run sequentially, directly on the main job BEFORE executing any of the parallel commands which # may be specified via parallel-commands and/or parallel-commands-on-agents diff --git a/package.json b/package.json index 4feac79..8751a17 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "private": true, - "version": "0.4.0", + "version": "0.5.0", "description": "This package.json is here purely to control the version of the Action, in combination with https://github.com/JamesHenry/publish-shell-action" }