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

Template project plugin should perform all post build steps even any of them failed

XMLWordPrintable

      (was: Groovy postbuild interrupts postbuild execution in a template if the job has failed.)

      All post build steps in a project are expected to be performed even when any of them failed.
      E.g. emails should be sent even if other post build steps failed.

      Jenkins core (e.g. freestyle projects) performs all post build steps using AbstractBuild.AbstractRunner#performAllBuildSteps
      https://github.com/jenkinsci/jenkins/blob/8e963cd77123f1713935c07782ed6f43ee94ce13/core/src/main/java/hudson/model/Build.java#L160
      https://github.com/jenkinsci/jenkins/blob/8e963cd77123f1713935c07782ed6f43ee94ce13/core/src/main/java/hudson/model/AbstractBuild.java#L634
      (They are codes of Jenkins 1.420 which template-project plugin targets)


      (original description)

      I'm using "Use publishers from another projects" and I have several post build steps in a template. If the build fails, post build steps in the template are executed until Groovy postbuild has finished and then I get:

      Build step 'Use publishers from another project' marked build as failure

      After that it will continue as normal running the remaining post build steps in the job, but discards rest of the post build steps in my template.

      If I remove my Groovy script from my template or the job succeeds, everything works OK. Same thing if I don't use a template.

            brantone Brantone
            anttih Antti Haijanen
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: