Defining a runner for a pipeline
In Chapter 5, we saw how to define a self-hosted runner. Bitbucket Pipelines allows the use of self-hosted runners to ensure not only are we using the correct platforms for building, but by specifying our own resources, we can avoid the build time limits of Bitbucket Cloud.
Now that we have runners defined, let’s see how to call them in bitbucket-pipelines.yml
.
How to do it...
Your self-hosted runners can be defined on a step basis in your bitbucket-pipelines.yml
file. Let’s see how that’s done:
- For a given step, define the runner to use for that step by adding the
runs-on
keyword followed by all the applicable labels. The following code snippet shows such an application:pipelines: custom: customPipelineWithRunnerStep: - step: name: First Step ...