I was trying to set docker image name in `bitbucket-pipelines.yml` as a value of environment variable. Unfortunately, both ways I've tried failed:
If I replace $IMAGE_NAME with actual value - everything works fine.
Could you please tell me if there is a way to perform it?
would be awesome. I just stumpled upon this issue. removed all hardcoded values from my pipeline definition and added them to team-variables so they can be changed easily without having to change bitbucket-pipeline.yml in all repositories. for everything else it works so far, just image cant be substituted.
I have the same issue.
It throws this error when using environment variables: There is a problem with the format of your docker image name at [image > name].
But if you goto the online validator it says it's syntactically valid with the environment variable.
My use case is that I'd like to define my AWS account id and region as environment variables so that the pipeline script is more portable between my local test BB account and the "real" repo.
The problem with the validator is that it only checks the YAML syntax. Seeing as an image name should be a string, and either `my-image:latest` or `$MY_IMAGE` is considered a string, the validator checks out. However as you already understand it doesn't interpolate variables on that specific location.
I also hope to get this one day. We regularly upgrade gradle version in gradle.properties and in Jenkins we have the first step extracting gradle version from this file and then uses it for the next step so we don't need to touch pipeline file every time we upgrade gradle.
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
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