Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39104

Add new template build step should do variable substitution

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • docker-plugin
    • None

      The "Add a new template to all docker clouds" build step makes an excellent follow-on build step to the "Build / Publish Docker Containers" build step.
      e.g. you can create an image tagged as myregistry:1234/myimage:version-${BUILD_NUMBER} and you'll get myimage:version-1, myimage:version-2 etc pushed to your registry in subsequent builds.
      However, if you use the "Add a new template to all docker clouds" build step and specify a "Docker Image" field of "myregistry:1234/myimage:version-${BUILD_NUMBER}" then that's exactly what you'll get - it won't replace ${BUILD_NUMBER} with the build number.

      What should happen is that all of the plain-text fields should be subjected to Jenkins' variable substitution so that all text fields can be parameterised.

          [JENKINS-39104] Add new template build step should do variable substitution

          pjdarton created issue -
          pjdarton made changes -
          Description Original: The "Add a new template to all docker clouds" build step makes an excellent follow-on build step to the "Build / Publish Docker Containers" build step.
          e.g. you can create an image tagged as myregistry:1234/myimage:version-${BUILD_NUMBER} and you'll get myimage:version-1, myimage:version-2 etc pushed to your registry in subsequent builds.
          However, if you use the "Add a new template to all docker clouds" build step and specify a "Docker Image" field of "myregistry:1234/myimage:version-${BUILD_NUMBER}" then that's *exactly* what you'll get - it won't replace ${BUILD_NUMBER} with the build number.

          What should happen is that all of the plain-text fields should be subjected to Jenkins' variable substitution so that all text fields can be parameterised.
          New: The "Add a new template to all docker clouds" build step makes an excellent follow-on build step to the "Build / Publish Docker Containers" build step.
          e.g. you can create an image tagged as myregistry:1234/myimage:version-$\{BUILD_NUMBER} and you'll get myimage:version-1, myimage:version-2 etc pushed to your registry in subsequent builds.
          However, if you use the "Add a new template to all docker clouds" build step and specify a "Docker Image" field of "myregistry:1234/myimage:version-$\{BUILD_NUMBER}" then that's *exactly* what you'll get - it won't replace $\{BUILD_NUMBER} with the build number.

          What should happen is that all of the plain-text fields should be subjected to Jenkins' variable substitution so that all text fields can be parameterised.
          Nicolas De Loof made changes -
          Assignee Original: magnayn [ magnayn ] New: Nicolas De Loof [ ndeloof ]
          Nicolas De Loof made changes -
          Assignee Original: Nicolas De Loof [ ndeloof ]

            Unassigned Unassigned
            pjdarton pjdarton
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: