Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Why is BitBucket not recognizing my runner's labels?

Andrew Williamson April 25, 2022

I created a Windows runner with the default labels:

- self.hosted
- windows

And added the following pipeline to the repo:

pipelines:
tags:
AssetReadingExportService-*:
- step:
name: Build the service
runs-on:
- 'windows'
script:
- dotnet build "AssetReadingExportService.csproj" -c Release -o "build/AssetReadingExportService"

I ran my pipeline, which failed because I'm targeting .net 6.0 so I needed msbuild17. I installed VS2022, and decided that I would add labels to indicate what tools are available on the runner. I've updated my runner to have the following labels:

- msbuild16
- msbuild17
- azurecli
- self.hosted
- windows

I updated the pipeline to require the specific msbuild version:

pipelines:
tags:
AssetReadingExportService-*:
- step:
name: Build the service
runs-on:
- 'msbuild17'
script:
- dotnet build "AssetReadingExportService.csproj" -c Release -o "build/AssetReadingExportService"

Now the build always fails and says no matching runner could be found.

Possibilities that I have ruled out:

  • I've made a typo - I had a co-worker double check the pipeline yaml and the labels on the runner, just to make sure I'm not missing something basic like that.
  • The original labels of the runner are cached - I deleted the runner, and created a new one with all the labels set from the beginning. Still no effect.

What am I missing here?

Note: I'm using a Windows runner because this is a mono-repo, and some of the services  require a Windows environment to build

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Graham Gatus
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 25, 2022

Hi @and 

For windows runners, at a minimum you will need the windows label, in addition to any further custom labels. Please see Using your Windows runner in your build configuration at https://support.atlassian.com/bitbucket-cloud/docs/configure-your-runner-in-bitbucket-pipelines-yml/ for more information.

Andrew Williamson April 25, 2022

That was the issue, thanks Graham. Is there a way to add the 'windows' label to the whole pipeline, or do I need to specify it on each step?

Like Robin Brinkhoff likes this
lliang2
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 25, 2022

We haven't provide global option for `runs-on` at the moment, so unfortunately you have to specify it on each step

TAGS
AUG Leaders

Atlassian Community Events