Post build step not removed from generated Maven job

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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.

            Assignee:
            Daniel Spilker
            Reporter:
            Yoann Dubreuil
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: