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

Evaluate variables and token macros in "Build Context" and "Additional Build Arguments"

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins 1.642.1
      Token Macro Plugin 1.12.1
      Docker Build and Publish plugin 1.2.1

      Environment variables and macro tokens are not expanded in "Build Context" and "Additional Build Arguments".

      It works in other fields like "Repository Name" or "Tag" so I'd expect it to work in other fields too.

      Log output:
      $ docker build --build-arg groupId=$GROUPID --build-arg=artifactId=$ARTIFACTID -t com.corp.product.logic:0.0.3-20160323114446-1623.e3d2d822 --pull=true $WORKSPACE/docker/$GROUPID.$ARTIFACTID

      "com.corp.product.logic:0.0.3-20160323114446-1623.e3d2d822" is evaluated from $GROUPID and $ARTIFACTID entered in fields "Repository Name" and "Tag".

      "--build-arg groupId=$GROUPID --build-arg=artifactId=$ARTIFACTID" is the original value entered in "Additional Build Arguments".

            csanchez Carlos Sanchez
            jks Julian Kassat
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: