Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute Shell Script after post build in Jenkins

I am trying to execute a shell script if either the build pass or fails after post-build in Jenkins. I cannot see this option in post build to execute some shell script except for running a target.

like image 929
topgun Avatar asked Jun 22 '12 16:06

topgun


People also ask

How Jenkins execute shell script as post build action?

I think you are looking for PostBuild Script Plugin. After install this plugin, you can add post-action "Execute Shell" by following these steps: Add post-build action -->Execute a set of scripts --> Add build Step --> Execute Shell.

How do I run a Jenkins post build script?

When you configure your jenkins job there is a section where you can specify post build actions. If this plugin is not visible then you need to download it. After that you can specify the script or the contents of the script. Click on apply and run the job.


1 Answers

Very easily done with Post build task plugin.

Jenkins - "Post build task" option

like image 81
Daniel Magnusson Avatar answered Sep 21 '22 18:09

Daniel Magnusson