Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Post build deploy

I am using Jenkins CI in my project, I am able to successfully build the project and I have no issues in deploying it in the container after every successful build. Now I have a condition that the deployment to the container has to happen only if there is a change in the release properties file. If there is no change in the release properties file then the project has to be built but no deployment should happen.

Since I am new to Jenkins I am trying out all the options, I am sure that someone must have been in the similar situation, please share your thoughts or ideas. Incase if I find something I will post it.

Highly Appreciate your help on this.

like image 270
Hakuna Matata Avatar asked Nov 14 '22 00:11

Hakuna Matata


1 Answers

If this is still not answered!!

This can we easily done using Script Trigger plugin. This allows you to run a shell/batch script and based on the exit code of this script the build will be executed.

You can keep track of the last modified date of the properties file and if it changed then you can go ahead and build, if not there will not be any build until the change happens.

Hope this helps (if at all required now ;)

like image 198
Waman Avatar answered Dec 31 '22 05:12

Waman