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

Artifact Resolver - Version parameter not passed from 'Build with Parameters'

    Details

    • Similar Issues:

      Description

      Summary: Parameter from 'Build with Parameters' is being passed as literal text, instead of selected value into the Artifact Resolver Build Step.

      IMAGE 1 - A job is configured to be BUILD with PARAMETERS, where the version of the artifact from Nexus can be selected.

      IMAGE 2,3,4 - The parameter ${groupId.artifactId} is not being propagated with the value selected. This can be seen in the logs as literal. The Artifact Resolver is configured as shown in the "repository-connector" plugin documentation.

        Attachments

        1. IMAGE 1.png
          IMAGE 1.png
          53 kB
        2. IMAGE 2.png
          IMAGE 2.png
          95 kB
        3. IMAGE 3.png
          IMAGE 3.png
          200 kB
        4. IMAGE 4.png
          IMAGE 4.png
          104 kB

          Issue Links

            Activity

            Hide
            gmckeever Greg McKeever added a comment -

            This is affecting me as well. Is there any known workaround for this issue? If not, are there any plans for a fix in the near future?

            Show
            gmckeever Greg McKeever added a comment - This is affecting me as well. Is there any known workaround for this issue? If not, are there any plans for a fix in the near future?
            Hide
            rama_arun rama arun added a comment - - edited

            Greg McKeever I found a work around for this. In your jenkins service init script add the following. The issue is due to a Security feature preventing unauthorized ingestion of variable values into configurations. The work around is to allow variable passing by doing the following:

            I added the following to the jenkins service init script - -Dhudson.model.ParametersAction.keepUndefinedParameters=true

            JAVA_CMD="$JENKINS_JAVA_CMD $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -Dhudson.model.ParametersAction.keepUndefinedParameters=true -jar $JENKINS_WAR"

            and --hudson.model.ParametersAction.keepUndefinedParameters=true

            if [ "$JENKINS_ENABLE_ACCESS_LOG" = "yes" ]; then
            PARAMS="$PARAMS --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.format=combined --hudson.model.ParametersAction.keepUndefinedParameters=true --simpleAccessLogger.file=/var/log/jenkins/access_log"
            fi

            and then restart Jenkins service.

            Show
            rama_arun rama arun added a comment - - edited Greg McKeever I found a work around for this. In your jenkins service init script add the following. The issue is due to a Security feature preventing unauthorized ingestion of variable values into configurations. The work around is to allow variable passing by doing the following: I added the following to the jenkins service init script - -Dhudson.model.ParametersAction.keepUndefinedParameters=true JAVA_CMD="$JENKINS_JAVA_CMD $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -Dhudson.model.ParametersAction.keepUndefinedParameters=true -jar $JENKINS_WAR" and --hudson.model.ParametersAction.keepUndefinedParameters=true if [ "$JENKINS_ENABLE_ACCESS_LOG" = "yes" ]; then PARAMS="$PARAMS --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.format=combined --hudson.model.ParametersAction.keepUndefinedParameters=true --simpleAccessLogger.file=/var/log/jenkins/access_log" fi and then restart Jenkins service.
            Hide
            gmckeever Greg McKeever added a comment -

            rama arun That worked - thank you!

            Show
            gmckeever Greg McKeever added a comment - rama arun That worked - thank you!
            Hide
            ardark Andrew Bessoltsin added a comment -

            solution from rama arun still actual.... year passed.

            Show
            ardark Andrew Bessoltsin added a comment - solution from rama arun  still actual.... year passed.
            Hide
            jgangemi Jae Gangemi added a comment -

            dup of JENKINS-38190?

            please try version 1.2.0 (soon to be released) and report back if your problem is resolved.

            Show
            jgangemi Jae Gangemi added a comment - dup of JENKINS-38190 ? please try version 1.2.0 (soon to be released) and report back if your problem is resolved.
            Hide
            jgangemi Jae Gangemi added a comment -

            plugin has been released and should show up on the update site soon.

            Show
            jgangemi Jae Gangemi added a comment - plugin has been released and should show up on the update site soon.

              People

              • Assignee:
                Unassigned
                Reporter:
                rama_arun rama arun
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: