ktdreyer/jenkins-job-wrecker

concurrentBuild not working with pipeline jobs

jpatallah opened this issue · 1 comments

jjwrecker breaks when attempting to convert the below xml file. The error is:

last called concurrentbuild
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/bin/jjwrecker", line 11, in <module>
    load_entry_point('jenkins-job-wrecker', 'console_scripts', 'jjwrecker')()
  File "/Users/jpatallah/GitRepos/jenkins-job-wrecker/jenkins_job_wrecker/cli.py", line 196, in main
    yaml = root_to_yaml(root, args.name, args.ignore_actions_tag)
  File "/Users/jpatallah/GitRepos/jenkins-job-wrecker/jenkins_job_wrecker/cli.py", line 97, in root_to_yaml
    handlers.gen_yml(job, root)
  File "/Users/jpatallah/GitRepos/jenkins-job-wrecker/jenkins_job_wrecker/modules/handlers.py", line 24, in gen_yml
    yml_parent[key].append(value[0])
AttributeError: 'bool' object has no attribute 'append'

The xml file is:

<?xml version="1.0" encoding="UTF-8"?><flow-definition plugin="pipeline">
  <definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps">
    <script>node {
  git(url: 'mygiturl', branch: 'develop')
  load 'filegroovy'
}
</script>
    <sandbox>false</sandbox>
  </definition>
  <actions/>
  <keepDependencies>false</keepDependencies>
  <displayName>my job</displayName>
  <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  <canRoam>true</canRoam>
  <concurrentBuild>false</concurrentBuild>
  <logRotator>
    <daysToKeep>90</daysToKeep>
    <numToKeep>50</numToKeep>
    <artifactDaysToKeep>-1</artifactDaysToKeep>
    <artifactNumToKeep>-1</artifactNumToKeep>
  </logRotator>
  <properties/>
  <scm class="hudson.scm.NullSCM"/>
  <publishers/>
  <buildWrappers/>
</flow-definition>

I have made the following PR: #93