How to commit, push and trigger jenkins build at once from command line

Earlier we talked about how to trigger jenkins build from command line.

Now consider a situation, when you are doing the development alone in the team and you need to commit your codes, push them and build each time to see an output.

In this case, you can create a simple shell script that will

  • take your commit message as argument and
  • then commit your modified files (which are versioned already)
  • then push your commit
  • and do the build as well

Save the script as run the script as

./ "commit message"

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.