Your Pipelines configuration must have at least one node pool, with at least one node, for pipelines to execute. These must be set up by an administrator user, with one node pool set as the default. A typical configuration will have been set up with multiple node pools to provide different choices for operating system and computing platforms.
For example, an adminstrator user may have set up these node pools and made them available to you for executing your pipelines:
- A static node pool of Ubuntu 20.04 nodes running on-prem, set as the default node pool
- A dynamic node pool of Ubuntu 20.04 nodes running on Amazon Web Services
- A static node pool of CentOS 7 nodes running on-prem
You can view the node pools available to you from the Pipelines Node Pools tab:
In your pipeline's DSL you can designate the pipeline or any individual steps to run in a node pool by its name.
- Pipeline node pool: You can specify a specific node pool for the pipeline in the
configurationblock of the pipeline, using the
nodePooltag. When specified here, all steps in the pipeline will execute in nodes from that node pool.
- Step node pool: You can specify a specific node pool for any step by declaring the
nodePooltag in the step's
configurationblock. This will override any node pool designation for the pipeline.
The following example pipeline specifies that all steps of the pipeline will execute in nodes from the dynamic node pool
ubuntu20aws on Amazon Web Services. The second step, however, overrides this as it is configured to run on an on-prem node from the static node pool
pipelines: - name: select_nodepool_example configuration: nodePool: ubuntu20aws # Run in the dynamic node pool on AWS steps: - name:nodePool_step1 type: Bash execution: onExecute: - echo "$step_name is running in $step_platform on $step_node_pool_name" - name: nodePool_step2 type: Bash configuration: nodePool: ubuntu20 # Run in the static node pool on-prem inputSteps: - name: nodePool_step1 execution: onExecute: - echo "$step_name is running in $step_platform on $step_node_pool_name" - name:nodePool_step3 type: Bash configuration: inputSteps: - name: nodePool_step1 execution: onExecute: - echo "$step_name is running in $step_platform on $step_node_pool_name"
When the pipeline is run:
nodePool_step3will execute on nodes in
nodePool_step2will execute on a node in