Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Repo env var in image line


I am using a custom docker image in my deployment pipeline. Works great.

However, it seems very sensible to me to maintain the docker version in an environment variable in the repository, so I can change it via the repo, and not with a code release.

This is because many projects use this single image to deploy, and changes to the image need to be handled correctly.

I don't want to have to do a code release for each project to simply change the version number of the deployment image. And I also need to know that they are going to work even if I do a new version of the image.

I'd want to move them over to the one by one, ensuring that they are still working as before, adding new env vars to the repo if need be or what ever is required.

Step code in pipelines :

- step:
name: DEVELOP - Deploy Complete
deployment: test
trigger: manual
name: my-dockerhub-repo/my-docker-image:$DOCKER_VERSION

I think line :

name: my-dockerhub-repo/my-docker:$DOCKER_HUB_VERSION

Should be acceptable. However, I get an error :

There is a problem with the format of your docker image name at [pipelines > branches > develop > 1 > step > image > name].

Presumably this is from a syntax check as it doesn't even run.

Any ideas how I can achieve this please ?



2 answers

1 accepted

2 votes
Answer accepted

Hello Jowan,

Currently only the username, password, and email support environment variable values. The image name does not support having environment variables.

If you'd like, you can open a feature request to support this here:

Depending on what you're doing, you could alternatively pull this image inside of your build script instead using Docker and run the relevant tests inside of the running container.



Hi Phil,

Thanks for the response.

Yes I see the (nested) docker solution and may use that, a mini docker just to spin up another docker with version number passed is a bit overkill though.

Definitely going to feature request it.


We had this error message:

There is a problem with the format of your docker image name at [image > name].

We tried to have image set like this:

   name: $DOCKER_REGISTRY/bitbucket-pipeline-image-ubuntu18:latest

 You should at least update the documentation here:
image.pngWith this information:

The image name does not support having environment variables.

Like Sean Reifschneider likes this

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket Pipelines

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

713 views 15 10
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you