Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
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

How to set docker image value from a plan variable

I'm trying to set the value for the Docker Image value in the Isolate Build settings of a Bamboo plan that is using the Docker Runner. To be clear, these are the settings to run a job in a container, not to perform steps to create docker images.  So the Docker Image value on the Bamboo plan configuration webpage is just a text box. When I create a plan variable like "bamboo_dockerimage" equal to a valid image location, and then enter "${bamboo.dockerimage}" in the text box (without the quotes), the variable is not substituted when the job executes. I can see the the raw unsubstituted variable name in the Docker command output when the job finishes in error log, instead of substituted value. I'm using Bamboo 6.4.0. Anyway to set the Docker image value to a variable? Ultimately I just want to override the image location from a key-value file in my source code. A new code revision might use a different image location.

 

1 answer

1 accepted

1 vote
Answer accepted
Marcin Gardias
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 06, 2020

Hmm, it seems to me that your variable's name does not match. If your plan variable (as shown in the variable UI) is named bamboo_dockerimage then the usage woudl be ${bamboo.bamboo_dockerimage}, that doesn't seem like sth. you intended.

Please rename your variable to dockerimage, then it will be referenced as ${bamboo.dockerimage} and exported as shell variable bamboo_dockerimage.

Marcin Gardias
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 06, 2020

Also, let me remind you that Bamboo version 6.4.0 is no longer supported. I strongly recommend an update to something newer.

You nailed it with the variable name!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events