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

Post build step not removed from generated Maven job

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • job-dsl-plugin
    • None
    • core 1.609.3
      job-dsl-plugin 1.38
      maven-plugin 2.12

      Removing postBuildSteps block from a job-dsl script does not remove the post build step on the generated job. To reproduce, create a job-dsl seed job with this script:

      mavenJob('example') {
        goals 'clean install'
        postBuildSteps { maven { goals "sonar:sonar -Psonar" } }
      }
      

      Remove postBuildSteps block and run job-dsl seed job again. Configuration page of generated job example will still contain the post build step.

      On disk config.xml of generated job doesn't have <postbuilders/> section anymore. Reloading generated job using a groovy script in system console doesn't help. Only restarting Jenkins works. That makes me think that the bug is in Maven plugin but not in JobDSL plugin. Something is wrong when reloading config.xml of generated job.

          [JENKINS-30548] Post build step not removed from generated Maven job

          Yoann Dubreuil created issue -
          Daniel Spilker made changes -
          Link New: This issue is related to JENKINS-26825 [ JENKINS-26825 ]
          Daniel Spilker made changes -
          Link New: This issue depends on JENKINS-21017 [ JENKINS-21017 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 165660 ] New: JNJira + In-Review [ 182072 ]
          CloudBees Inc. made changes -
          Remote Link New: This issue links to "CloudBees Internal OSS-261 (Web Link)" [ 18931 ]
          Jesse Glick made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Daniel Spilker made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            daspilker Daniel Spilker
            ydubreuil Yoann Dubreuil
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: