Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-15861

Unable to use variables in docker build/push tasks

XMLWordPrintable

      https://confluence.atlassian.com/display/BAMBOO/Bamboo+variables says that variables should be usable in any field other than password fields, but the docker build/push steps won't allow them due to their syntax checking.

      For example, I want to create a template plan for building docker images that can be easily cloned and updated for different containers. So instead of hard coding the repository, image name, and image tag in every step I attempt to use variables to specify the options that may change between plans.

      But when I attempt to use something like this for the repository name:

      ${bamboo.dockerRepository}/${bamboo.imageName}:${bamboo.buildNumber}
      

      I am presented with a error like this:

      Invalid repository name (${bamboo.imageName}), only [a-zA-Z0-9_.-] are allowed
      

      Even if bamboo.imageName follows the syntax required for a docker image name.

            achystoprudov Alexey Chystoprudov
            9731c02fd9b8 Adam Jodock
            Votes:
            19 Vote for this issue
            Watchers:
            29 Start watching this issue

              Created:
              Updated:
              Resolved: