Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

PostBuildScript makes it possible to execute a set of scripts at the end of the build. 



Plugin Information

View PostBuildScript on the plugin site for more information.

Older versions of this plugin may not be safe to use. Please review the following warnings before using an older version:

You can configure these actions depending on the build status (i.e., only run when build is successful).

With version 1.1.0 scripts can be executed on the master, on slaves or both.

Please refer to the readme file for further information.

Reporting issues

Please first look through Jira. If a ticket already exists, please add a comment and try to explain the issue a little more further. If no ticket exists, please open a new one.

In general please provide example configurations (config.xml, Job DSL scripts, ...) and also screenshots are very helpful to reproduce problems.

Please try to be constructive. If you have a feedback, it's better to write me a direct message.


The plugin was created in 2011 by Gregory Boissinot. It was adopted by Daniel Heid in Oktober 2017. Feel free to contribute as you like by forking the repository and creating pull requests.

For bug fixes and enhancements to existing features, first make sure an issue is filed by checking this Jira filter.

After that please create a pull request on GitHub with your change and link to the JIRA issue in the PR, and link to the PR from the JIRA issue.

Release Notes

Please refer to the README document to see the latest release notes: https://github.com/jenkinsci/postbuildscript-plugin#release-notes


  1. Unknown User (jamesco)

    With the update to 1.1.0 the plugin does not run groovy scripts. Tried with "Run on" as Both or Slave or Master.

    "[PostBuildScript] - Build does not have any of the results [] or should not be executed on this node role. Did not execute $WORKSPACE/yadda/yadda/script.groovy"
    How can this be solved?
  2. Unknown User (jamesco)

    Same for PostBuildScript plugin 2.0.0 

    Jenkins ver. 2.60.2 


  3. Unknown User (dheid)

    Hey James,

    I cannot reproduce the problem.

    Are you running the Groovy script on the agent or on the master?

    Could you please provide the config.xml or at least an excerpt of it here?

    Please post your answer here:  JENKINS-11285 - Getting issue details... STATUS

  4. Unknown User (jamesco)

    SOLVED! Thanks Daniel I had no build result selected. DOH! Simple! 
    I didn't recognise the new result scroll selection widget as a selection widget!

    By default when you configure a new script the selection widget has no result selected.

    So make sure to select at least one result (probably SUCCESS and UNSTABLE for many scripts). 

    This is a cool new feature actually, most of our few post-build scripts have some groovy logic at the top checking build result and causing different actions. Nice to have that done in plugin and visible in job config! 

    1. Unknown User (dheid)

      Good idea! I'll implement that. You're welcome!

  5. Unknown User (truckfondue)

    1. Unknown User (dheid)

      Yes, actually I'm working on that at the moment. It already took some days and it will take more time. Currently I have much to do, but I'll do my best.

      1. Unknown User (truckfondue)

        AWESOME! Thanks for the heads up Daniel.

        1. Unknown User (dheid)

          I implemented the new format into the Job DSL and added a pull request: https://github.com/jenkinsci/job-dsl-plugin/pull/1098

          Perhaps you can vote for it?

      2. Unknown User (fm4zyqnfbbfpim)

        Oh great! Thanks Daniel! Sorry I didn't know you were just working on that and opened  JENKINS-49180 - Getting issue details... STATUS

        (summary: "postBuildStep" takes super long to compile/evaluate the code, and makes DSL seed job run for many hours)

        But thank you so much for implementing this feature!!

        1. Unknown User (dheid)

          I'm on it and opened JENKINS-49218 - Getting issue details... STATUS  in addition. It's more difficult to upgrade the Jenkins Job DSL plugin, than I ever expected and I do not have much time left. I will try to continuously upgrade the Jenkins Job DSL plugin now to let you benefit of the improvements.

        2. Unknown User (dheid)

          I implemented the new format into the Job DSL and added a pull request: https://github.com/jenkinsci/job-dsl-plugin/pull/1098

          Perhaps you can vote for it?