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

Support all result types for build steps of postBuildScripts plugin

XMLWordPrintable

      When using v1.66 of the job-dsl-plugin the postBuildScripts plugin can be used as follows:

      job {
        publishers {
          postBuildScripts {
            onlyIfBuildSucceeds(true)
            onlyIfBuildFails(true)
            steps {
               ... build steps ...
            }
          }
        }
      }

      The problem is that due to how results are migrated from the old XML style to new (See: https://github.com/jenkinsci/postbuildscript-plugin/blob/9e7a84a29a3b48b93f18606a7eaea22f03f5013a/src/main/java/org/jenkinsci/plugins/postbuildscript/PostBuildScript.java#L143-L152) the only values which can be set are SUCCESS or FAILURE using the job-dsl-plugin

       

      I would like to also run my post build steps if a job is ABORTED for example but there is no API to do this.

            daspilker Daniel Spilker
            gd185052 G D
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: