jenkins-job-builder 0.9.0: trigger-builds::predefined-parameters renders multiple params incorrectly

Bug #1381079 reported by Jonathan Matthews
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
Fix Committed
Undecided
Andrey Pavlov

Bug Description

jenkins-job-builder version 0.9.0.

When trigger-builds::predefined-parameters is given two separate parameters, it conflates them in the `hudson.plugins.parameterizedtrigger.PredefinedBuildParameters` XML output.

This happens when the params are given on two lines (see attachment, job name "test") and also when there is an explicit "\n" given after the first parameter (job name "test-with-slash-n").

Providing 2 separate predefined-parameters sections doesn't help, as only the final param is actually rendered in the XML (job name "test-with-multiple-predefined-parameters").

This bug makes it impossible to submit multiple parameters to a triggered build using predefined-parameters, and breaks existing jobs using this technique as the first defined param gets the second param's name and value appended onto its value.

The docs (http://ci.openstack.org/jenkins-job-builder/builders.html?highlight=trigger-builds#builders.trigger-builds) imply that multiple params are possible ("key/value pairS"), but no example is given. Using a list fails to parse in my tests.

Revision history for this message
Jonathan Matthews (x-contact-z) wrote :
Revision history for this message
Jonathan Matthews (x-contact-z) wrote :

Here's the XML output rendered when using the previously attached bug.yml with an empty config file.

Revision history for this message
Jonathan Matthews (x-contact-z) wrote :

(My failed attempt to insert a newline with a literal "\n" is in contrast to the behaviour I've observed of scm::triggers::pollscm. There, inserting a "\n" in the single string accepted by that directive results in multiple polling schedules being created, albeit in a pretty ugly way in the yaml.)

Revision history for this message
Jonathan Matthews (x-contact-z) wrote :

(I meant job::triggers::pollscm instead of scm::triggers::pollscm in comment #3)

Khai Do (zaro0508)
tags: added: jjb
Revision history for this message
Andrey Pavlov (apavlov-e) wrote :

I faced with same problem and found solution that works for me -

            predefined-parameters: |
              NAME=$NAME
              VER=$VER
              RUN_X="something"

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to jenkins-job-builder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/137890

Changed in openstack-ci:
assignee: nobody → Andrey Pavlov (apavlov-e)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to jenkins-job-builder (master)

Reviewed: https://review.openstack.org/137890
Committed: https://git.openstack.org/cgit/openstack-infra/jenkins-job-builder/commit/?id=047fd60f7ecca47b8f1bfc9e182149907c7fd7b5
Submitter: Jenkins
Branch: master

commit 047fd60f7ecca47b8f1bfc9e182149907c7fd7b5
Author: Andrey Pavlov <email address hidden>
Date: Sat Nov 29 12:05:34 2014 +0300

    Add examples for 'predefined-parameters'

    There was no example how to make multiline 'predefined-parameters'.

    Change-Id: Ic287cd37ff928e34d80104085a3aca6f5d34865a
    Closes-Bug: 1381079

Changed in openstack-ci:
status: In Progress → Fix Committed
Revision history for this message
Jitendra kumar (jitu-icfai) wrote :

Hi Team
Sorry for writing here, As I am new here, so did not find where to report my issue.

For me my jenkins job builder is responding very slow, it happens some time only. Yes My job is able to configure but process is taking lots of time. some time its taking around 2hr. Generally its taking 1 - 2 minutes only. Any help regarding this will be helpful for me .

Version: 0.7.0.15.g1441ebf

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.