Build Triggers
The first way and most simple way to start LOG job is just click in to Build Now button. But this way is manually and not so cool. We want to trigger Jenkins job running automatically, so to do this, click to Configure from LOG dashboard.
Then select to Build Triggers tab you will some option to configure so job could trigger automatically
Have 5 ways to automate trigger Jenkins job as show above. In this book I will focus on Poll SCM, the good way in configure for a continuous system. Now you click on Poll SCM, you will see a text box show up for setting schedule
So following are steps show up how Poll SCM work :
- Base on schedule setting, Jenkins will actively check Github repository to see if have any change from repository
- If have any change on Github repo Jenkins job will trigger
Schedule with Poll SCM work follow cron schedule rule, above image show some cron schedule example. Basically, we want to catch the change on Github repository as soon as possible, so follow text will be add to Schedule * . This mean we want to check change on Github every minute !
Click to Save and Jenkins will move you back to job dashboard
Now is the time to check if this setting really work ?
I will go to my GOL project repo on Github and change content of file README.markdown right from web browser (Github support commit change right from web browser)
Now come back to job dash board, wait for about 1 minute, you will see new job is planning and run.
That it, it work !!!, to practice by yourself, just clone GOL project to your account by Fork button and then change the GOL configuration point to your github account as show below.