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

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

    XMLWordPrintable

Details

    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

            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?

            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?
            rama_arun rama arun added a comment - - edited

            gmckeever 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.

            rama_arun rama arun added a comment - - edited gmckeever 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.
            gmckeever Greg McKeever added a comment -

            rama_arun That worked - thank you!

            gmckeever Greg McKeever added a comment - rama_arun That worked - thank you!

            solution from rama_arun still actual.... year passed.

            ardark Andrew Bessoltsin added a comment - solution from rama_arun  still actual.... year passed.
            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.

            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.
            jgangemi Jae Gangemi added a comment -

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

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

            People

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

              Dates

                Created:
                Updated:
                Resolved: