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

NodeLabelParameter plugin is missing value parameter for queue jobs

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      This plugin will break many APIs and other plugins when there is a job in the queue.

      The queue parameter is missing the 'value' entry that is sent from Jenkins through JSON. See output after build.actions below.

      ----- Steps to reproduce
      Install Jenkins, install NodeLabelPlugin. (See environment for exact version info)
      Create a job that uses the NodeLabelPlugin.
      Build with Parameters, and fill in some some parameters (see screenshot).
      Take a look at the queue (see screenshot).
      Install Python jenkinsapi (using 0.2.16-2):
      apt-get install python-jenkinsapi
      Type in the following commands:

      >>> import jenkinsapi
      >>> jenkinsurl='http://localhost:8080'
      >>> jobname='MyJob'
      >>> jenkins = jenkinsapi.jenkins.Jenkins(jenkinsurl)
      >>> queue=jenkins.get_queue()
      >>> queued_builds = queue.get_queue_items_for_job(jobname)
      >>> build=queued_builds[0]
      >>> build.actions
      [{'parameters': [{'name': 'job_id', 'value': '0'}, {'name': 'node_label'}, {'name': 'content_id', 'value': ''}, {'name': 'config_id', 'value': ''}]}, {'causes': [{'userName': 'Matt', 'userId': 'mbells', 'shortDescription': 'Started by user Matt'}]}]
      >>> for b in queued_builds:
      ...    print (b, b.get_parameters())
      Traceback (most recent call last):
        File "<stdin>", line 2, in <module>
        File "/usr/lib/python2.7/dist-packages/jenkinsapi/queue.py", line 97, in get_parameters
          return dict([(x['name'], x['value']) for x in parameters])
      

        Attachments

          Issue Links

            Activity

            Hide
            domi Dominik Bartholdi added a comment -

            implemented with 1.6

            Show
            domi Dominik Bartholdi added a comment - implemented with 1.6

              People

              • Assignee:
                domi Dominik Bartholdi
                Reporter:
                mbells Matthew Bells
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: