Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do you insert a env variable in the service definition image name?

jj471
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 30, 2021

I want to add an environment-specific variable to the service image tag.

 

For example

image: some-image:{$env_var}

 

I have tried:

- some-image:$env_var

- "some-image:${env_var}"

- "some-image:{{$env_var}}"

2 answers

1 vote
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 30, 2024

Hello,

I've just published an article and a video showing how you can use a variable as the image name.

This solution is based on Dynamic Pipelines and requires a Forge app.

 

Hope this helps,
Caterina

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 5, 2021

Hi @jj471 and welcome to the community.

I'm afraid that it is not possible to use an environment variable in the Docker image name at the moment. The image name and version need to be specified in the yaml file without the use of variables.

We have a feature request for what you are asking in our issue tracker:

If you'd be interested in this, I would suggest that you add your vote in the feature request (by selecting the Vote for this issue link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy here and any updates will be posted in the feature request.

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events