[JIRA] (JENKINS-60459) Pipeline parameters not properly updated in multibranch job config

4 views
Skip to first unread message

allan.lewis@youview.com (JIRA)

unread,
Dec 12, 2019, 6:30:04 AM12/12/19
to jenkinsc...@googlegroups.com
Allan Lewis created an issue
 
Jenkins / Bug JENKINS-60459
Pipeline parameters not properly updated in multibranch job config
Issue Type: Bug Bug
Assignee: Andrew Bayer
Attachments: plugins.txt
Components: pipeline-model-definition-plugin
Created: 2019-12-12 11:29
Environment: Jenkins 2.176.2
Plugins: see attached plugins.txt
Priority: Major Major
Reporter: Allan Lewis

I have a multi-branch pipeline where I've replaced a boolean parameter with a choice parameter but the "build with parameters" page shows the old boolean parameter; this is after I've done a dummy run to pick up the change. The log reports that it read the pipeline from the latest commit on that branch (master) which has the parameter change.

In branches/master/config.xml, I see that the new parameter is listed in the parameters element, but the definition in parameterDefinitions is the old one! Here's an excerpt of that file - the old parameter is named REBOOT_FIRST and the new one is REBOOT_WHEN:

branches/master/config.xml
<flow-definition plugin="workfl...@2.33">
  <actions>
...
<org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction plugin="pipeline-mod...@1.3.9">
...
      <parameters>
        <string>REBOOT_WHEN</string>
...
      </parameters>
...    </org.jenkinsci.plugins.pipeline.modeldefinition.actions.DeclarativeJobPropertyTrackerAction>
  </actions>
...
  <properties>
    <hudson.model.ParametersDefinitionProperty>
      <parameterDefinitions>
        <hudson.model.BooleanParameterDefinition>
          <name>REBOOT_FIRST</name>
          <description>...</description>
          <defaultValue>true</defaultValue>
        </hudson.model.BooleanParameterDefinition>
...

(I've elided various irrelevant bits with '...')

So it seems like the first list has been updated, but the actual definition hasn't. THis has left me with a broken pipeline that I can't recover without editing config.xml manually and restarting Jenkins; I haven't yet tried this but I expect it to work.

If updating any plugins would help, please advise and I'll try that, subject to my sysadmin approving.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

allan.lewis@youview.com (JIRA)

unread,
Dec 12, 2019, 6:33:03 AM12/12/19
to jenkinsc...@googlegroups.com
Allan Lewis commented on Bug JENKINS-60459
 
Re: Pipeline parameters not properly updated in multibranch job config

I'm not sure which plugin is responsible for this logic - apologies if I picked the wrong one!

allan.lewis@youview.com (JIRA)

unread,
Dec 12, 2019, 6:40:02 AM12/12/19
to jenkinsc...@googlegroups.com

I just noticed that there are many hudson.model.ParametersDefinitionProperty elements in config.xml! So perhaps they're being appended instead of replaced? The excerpt in the description is from the first one, which I guess gets read in favour of the later ones.

Reply all
Reply to author
Forward
0 new messages