In my build plan I have a a variable injection step which sets a variable (`
DockerConfiguration dockerConfiguration = new DockerConfiguration().image("${bamboo.inject.DOCKER_IMAGE_PATH_MAIN}");
${bamboo.inject.DOCKER_IMAGE_PATH_MAIN:-bamboo.DOCKER_IMAGE_DEFAULT_PATH}
to fall back to the value of DOCKER_IMAGE_DEFAULT_PATH if DOCKER_IMAGE_PATH_MAIN is not defined.
I was wondering if there is a way to define this sort of logic in bamboo variable interpolation, or alternatively, if there was a way to set a value for an injected variable at deploy time.
Thanks
You can define a variable with the same name at global, plan or Deployment Environment level. If injected variable exist it will override, if not, it will resolve to the 'broader scope' variable.
Check @Marcin Gardias comment below.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, deployments do inherit variables from the build that created the release that is being deployed BUT: inject variable task has to be set to create variables in RESULT scope (in other words: not LOCAL)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.