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

CopyArticat plugin cannot resolve NodeLabel parameter

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have a parameterized job, which specifies a Label parameter from the NodeLabel plugin, calling it JK_PLATFORM.

      This JK_PLATFORM parameter is available in the environment doing the build. But when I want to do a "archive the artifacts" in as post build action and use ${JK_PLATFORM} as part of the "files to archive" like

      ${JK_SVN_BRANCH}/${JK_PLATFORM}/${JK_RELEASE}/cdrom/*

      I get the following error:


      Archiving artifacts
      ERROR: No artifacts found that match the file pattern "trunk/${JK_PLATFORM}/false/cdrom/*". Configuration error?

      Looks like the JK_PLATFORM parameter is not resolved.

        Attachments

          Activity

          Hide
          cjo9900 cjo9900 added a comment -

          I think the problem is that the node label parameters do not implement the buildEnvVars() [1] method of ParameterValue so they are not added to the environment correctly, but only when createBuildWrapper() is called.

          If this is added then the parameter would be resolved as the parameter would be present in the env.

          [1] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/ParameterValue.java#L130

          Show
          cjo9900 cjo9900 added a comment - I think the problem is that the node label parameters do not implement the buildEnvVars() [1] method of ParameterValue so they are not added to the environment correctly, but only when createBuildWrapper() is called. If this is added then the parameter would be resolved as the parameter would be present in the env. [1] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/ParameterValue.java#L130
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: imod
          Path:
          src/main/java/org/jvnet/jenkins/plugins/nodelabelparameter/LabelParameterValue.java
          http://jenkins-ci.org/commit/nodelabelparameter-plugin/e8918d5bc0d025a224db89d511cc31790fff13fb
          Log:
          [FIXED JENKINS-15802] expose node/label parameter to env

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: src/main/java/org/jvnet/jenkins/plugins/nodelabelparameter/LabelParameterValue.java http://jenkins-ci.org/commit/nodelabelparameter-plugin/e8918d5bc0d025a224db89d511cc31790fff13fb Log: [FIXED JENKINS-15802] expose node/label parameter to env

            People

            Assignee:
            domi Dominik Bartholdi
            Reporter:
            sonni Sonni Nørløv
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: