You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.