How to upgrade self-hosted Windows Runners in Bitbucket Cloud?

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

Currently, it is not possible to upgrade Windows Runners automatically in Bitbucket Cloud. If the windows runners are outdated, the pipeline build may fail. 

Diagnosis

You may see a similar message in build logs when running the pipeline if runners are outdated. 


Runner matching labels:
- windows
- self.hosted
Runner name: win32-runner
Runner labels: windows, self.hosted
Runner version:
current: 1.379
latest: 1.381
The version of this runner is outdated. Upgrade to the latest version (1.381).

(info) Please note the error message may differ based on the runner versions. 

Solution

For Windows runners, you'll need to download and extract the zip file of the latest version and then start the runner from the directory of the latest version.

When you create a Windows runner from the Bitbucket website, the first 3 commands that are given are the following:

Invoke-WebRequest -Uri https://product-downloads.atlassian.com/software/bitbucket/pipelines/atlassian-bitbucket-pipelines-runner-1.381.zip -OutFile .\atlassian-bitbucket-pipelines-runner.zip

Expand-Archive .\atlassian-bitbucket-pipelines-runner.zip

cd .\atlassian-bitbucket-pipelines-runner\bin  
  • Stop the existing runner.
  • Delete the existing "atlassian-bitbucket-pipelines-runner.zip" file and "atlassian-bitbucket-pipelines-runner" directory to avoid any confusion.
  • Then download the new version and extract the zip file with the commands above. (info) Please note the version in the zip file will be different if there is a newer version available. Kindly ensure the commands are copied from the new runner setup.
  • Use the last command which is displayed when you are creating the runner (not included in the list above) to start the runner from the new directory.

 You may use this approach to upgrade Windows runners currently. 

Last modified on Jan 26, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.