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

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

    Details

    • Similar Issues:

      Description

      (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.

        Attachments

          Activity

          Hide
          ikedam ikedam added a comment -

          What is "Use publishers from another projects"?

          Show
          ikedam ikedam added a comment - What is "Use publishers from another projects"?
          Hide
          ikedam ikedam added a comment -

          This looks a issue of template-project-plugin.
          (But I think this is not a bug, but a designed behavior of template-project-plugin.)

          Show
          ikedam ikedam added a comment - This looks a issue of template-project-plugin. (But I think this is not a bug, but a designed behavior of template-project-plugin.)
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: ikedam
          Path:
          src/main/java/org/jvnet/hudson/plugins/groovypostbuild/GroovyPostbuildRecorder.java
          http://jenkins-ci.org/commit/groovy-postbuild-plugin/e0a3487c03b4c79c5e6d26c378d8d7f71d2f0b40
          Log:
          Merge pull request #21 from aroskuski/master

          JENKINS-21276 Fix GroovyPostBuild plugin incorrectly reporting that it failed (improves the behavior used with template-project).

          Compare: https://github.com/jenkinsci/groovy-postbuild-plugin/compare/2ee910fec274...e0a3487c03b4

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/org/jvnet/hudson/plugins/groovypostbuild/GroovyPostbuildRecorder.java http://jenkins-ci.org/commit/groovy-postbuild-plugin/e0a3487c03b4c79c5e6d26c378d8d7f71d2f0b40 Log: Merge pull request #21 from aroskuski/master JENKINS-21276 Fix GroovyPostBuild plugin incorrectly reporting that it failed (improves the behavior used with template-project). Compare: https://github.com/jenkinsci/groovy-postbuild-plugin/compare/2ee910fec274...e0a3487c03b4
          Hide
          ikedam ikedam added a comment -

          Released groovy-postbuild-2.2.1 improving the behavior with template-project-plugin. It will be available in the update center in a day.
          Though, this issue is of template-project-plugin and can cause problems with other plugins.
          I updated the summary and description and leave this issue open.

          Show
          ikedam ikedam added a comment - Released groovy-postbuild-2.2.1 improving the behavior with template-project-plugin. It will be available in the update center in a day. Though, this issue is of template-project-plugin and can cause problems with other plugins. I updated the summary and description and leave this issue open.
          Show
          brantone Brantone added a comment - https://github.com/jenkinsci/template-project-plugin/pull/18

            People

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

              Dates

              • Created:
                Updated:
                Resolved: