Search code examples
apachejenkinscontainersjenkins-pluginsjenkins-cli

How to add a specific post build action in jenkins for multiple jobs in one shot?


I need to add a post-build action(Deploy to container) to 23 jobs at a time. Is there a plugin to do that to make my work easy?


Solution

  • You have two solutions:

    • Either you update the post-build actions for each Job

    • Either you are able to script your post-build action using Postbuildscript's plugin: https://plugins.jenkins.io/postbuildscript And you call this script in your post-build action

    Benefit of the second solution, is that you will have to update your job's configuration only once. Then you only need to maintain your script.