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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,571
Community Members
 
Community Events
185
Community Groups

Do deployment variables work in self-hosted Pipeline Runners?

Hi there,

 

I have set up a self-hosted Pipeline Runner on a Windows machine, and the deployment variables are not working despite following the documentation here:

https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/

 

I do not see anything suggesting that they're not supported here:

https://support.atlassian.com/bitbucket-cloud/docs/set-up-runners-for-windows/

 

So I'm wondering if anyone else has had luck with getting these to work?

 

Thanks!

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 17, 2022

Hi @elanclarkson and welcome to the community!

I have been able to replicate this issue, so this looks like a bug that we need to further investigate.

I will reach out to the development team and I will let you know when I have an update.

Kind regards,
Theodora

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jun 22, 2022

Hi @elanclarkson,

The issue has been fixed. Could you please check if deployment variables work now in your Windows runner?

For testing purposes, you can use the following command in the script of your bitbucket-pipelines.yml file to print the value of a variable named myVar:

$env:myVar

Please note that if the variable is secured we do not display its value in the Pipelines log, so the previous command will print $Env:myVar if myVar is a secured variable. However, you can print its value in a new file that you define as an artifact, and then download that artifact to double-check the value.

script:
- $env:myVar > artifactfile.txt
artifacts:
- artifactfile.txt

Kind regards,
Theodora

Many thanks Theodora, works like a charm!

 

... I do note that I can only access the vars by using the $env:myVar syntax mentioned. I was expecting to be able to use $myVar as per the documentation but this isn't a major.

 

Thanks again!

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jul 06, 2022

Hi Elan,

You are very welcome, I'm glad to have helped!

The different way of referencing environment variables has to do with Windows Runners builds running on PowerShell instead of Docker containers, and you are right that this info is missing from our documentation. I will reach out to my team internally and request to have this added.

Please feel free to reach out if you ever need anything else!

Kind regards,
Theodora

Like elanclarkson likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events