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

Trigger via script does not support LABEL

XMLWordPrintable

      UPDATE:

      I can circumvent this issue by using /job/JOBNAME/buildWithParameters instead. Deprioritized.

      When I try to specify the label parameter in launching my jenkins job like this:

      curl --silent --show-error --data 'json={"parameter":[

      {"name":"NODE_LABEL","value":"LABEL"}

      ]&Submit=Build' http://jenkins:8888/job/JOBNAME/build

      It seems to ignore it and I end up with an error message like this:

      00:00:00.018 FATAL: Null value not allowed as an environment variable: NODE_LABEL
      00:00:00.018 java.lang.IllegalArgumentException: Null value not allowed as an environment variable: NODE_LABEL
      00:00:00.019 at hudson.EnvVars.put(EnvVars.java:172)
      00:00:00.019 at org.jvnet.jenkins.plugins.nodelabelparameter.LabelParameterValue.buildEnvVars(LabelParameterValue.java:71)
      00:00:00.019 at hudson.model.ParametersAction.buildEnvVars(ParametersAction.java:82)
      00:00:00.019 at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:961)
      00:00:00.019 at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:776)
      00:00:00.019 at hudson.model.AbstractProject.checkout(AbstractProject.java:1353)
      00:00:00.019 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:689)
      00:00:00.019 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      00:00:00.019 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:594)
      00:00:00.019 at hudson.model.Run.execute(Run.java:1567)
      00:00:00.019 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      00:00:00.019 at hudson.model.ResourceController.execute(ResourceController.java:88)
      00:00:00.019 at hudson.model.Executor.run(Executor.java:237)

            domi Dominik Bartholdi
            hofan41 Ho-Fan Kang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: