Jenkins build trigger
Thanks to Esteban add-on on Smalltalkhub, it is now possible to notify Jenkins that there is a new package published for your project. What we do for now is to poll very often (each minute) smalltalkub to check if there is an update. It is a big waste of resources! Now we can do better! It would be very nice to update your jobs to now use the commit hook. Here is the way to go: go to your job configuration on Jenkins In the build triggers section, enable Trigger builds remotely (e.g., from scripts) and choose an authentication token. disable [URLTrigger] - Poll with a URL go to smalltalkhub, on your project settings page Fill in the commit hook url field with https://ci.inria.fr/pharo-contribution/buildByToken/build?job=JOBNAME&token=... by replacing JOBNAME and TOKEN by the Jenkins job name and the token chosen. In the end, the build is now triggered immediately after the commit (no more delay). Christophe
Thats cool. Thanks Esteban, and Christophe for the instruction. On Wed, Mar 11, 2015 at 9:55 PM, Christophe Demarey < Christophe.Demarey@inria.fr> wrote:
Thanks to Esteban add-on on Smalltalkhub, it is now possible to notify Jenkins that there is a new package published for your project. What we do for now is to poll very often (each minute) smalltalkub to check if there is an update. It is a big waste of resources! Now we can do better! It would be very nice to update your jobs to now use the commit hook.
Here is the way to go:
- go to your job configuration on Jenkins - In the *build triggers* section, - enable *Trigger builds remotely (e.g., from scripts)* and choose an* authentication token*. - disable [*URLTrigger] - Poll with a URL* - go to smalltalkhub, on your project settings page - Fill in the *commit hook url *field with https://ci.inria.fr/pharo-contribution/buildByToken/build?job= *JOBNAME*&token=*TOKEN* by replacing JOBNAME and TOKEN by the Jenkins job name and the token chosen.
In the end, the build is now triggered immediately after the commit (no more delay).
Christophe
On 11/03/15 14:55, Christophe Demarey wrote:
Here is the way to go:
* go to your job configuration on Jenkins o In the *build triggers* section, + enable *Trigger builds remotely (e.g., from scripts)* and choose an*authentication token*. + disable [*URLTrigger] - Poll with a URL* * go to smalltalkhub, on your project settings page o Fill in the *commit hook url *field with https://ci.inria.fr/pharo-contribution/buildByToken/build?job=*JOBNAME*&toke... by replacing JOBNAME and TOKEN by the Jenkins job name and the token chosen.
I tried that with a new project XPath. Did I do something wrong/is there a delay? It hasn't start building yet. Stephan
Le 17 mars 2015 à 10:18, Stephan Eggermont a écrit :
On 11/03/15 14:55, Christophe Demarey wrote:
Here is the way to go:
* go to your job configuration on Jenkins o In the *build triggers* section, + enable *Trigger builds remotely (e.g., from scripts)* and choose an*authentication token*. + disable [*URLTrigger] - Poll with a URL* * go to smalltalkhub, on your project settings page o Fill in the *commit hook url *field with https://ci.inria.fr/pharo-contribution/buildByToken/build?job=*JOBNAME*&toke... by replacing JOBNAME and TOKEN by the Jenkins job name and the token chosen.
I tried that with a new project XPath. Did I do something wrong/is there a delay? It hasn't start building yet.
There is no delay. The first thing to try if it does not work is to open the URL given on smalltalkhub from a web browser (strangely, does not work with curl/wget). ex: curl https://ci.inria.fr/pharo-contribution/buildByToken/build?job=*JOBNAME*&toke... You should see the message 'scheduled!'. If it does not work, check the URL used and fix it. Hope this helps.
On 17/03/15 14:52, Christophe Demarey wrote:
There is no delay. The first thing to try if it does not work is to open the URL given on smalltalkhub from a web browser (strangely, does not work with curl/wget). ex: curl https://ci.inria.fr/pharo-contribution/buildByToken/build?job=*JOBNAME*&toke...
You should see the message 'scheduled!'. If it does not work, check the URL used and fix it.
That results in scheduled. The first time, it resulted in two builds being scheduled. After trying again, one build was scheduled. After committing again, no build was scheduled. Stephan
Le 17 mars 2015 à 15:28, Stephan Eggermont a écrit :
On 17/03/15 14:52, Christophe Demarey wrote:
There is no delay. The first thing to try if it does not work is to open the URL given on smalltalkhub from a web browser (strangely, does not work with curl/wget). ex: curl https://ci.inria.fr/pharo-contribution/buildByToken/build?job=*JOBNAME*&toke...
You should see the message 'scheduled!'. If it does not work, check the URL used and fix it.
That results in scheduled. The first time, it resulted in two builds being scheduled. After trying again, one build was scheduled. After committing again, no build was scheduled.
then, the problem should be investigated on the Smalltalkhub side. It would be good to have a test button there and be able to get the feedback. Without that, difficult to say what is wrong
On 17/03/15 16:08, Christophe Demarey wrote:
Le 17 mars 2015 à 15:28, Stephan Eggermont a écrit :
That results in scheduled. The first time, it resulted in two builds being scheduled. After trying again, one build was scheduled. After committing again, no build was scheduled.
then, the problem should be investigated on the Smalltalkhub side. It would be good to have a test button there and be able to get the feedback. Without that, difficult to say what is wrong
I find it interesting that the missing build gets triggered after triggering a build with a web browser, and especially that a normal curl/wget does not work. Which projects actually use this build trigger? Versionner still uses both url trigger and this one. Stephan
Le 17 mars 2015 à 19:41, Stephan Eggermont a écrit :
On 17/03/15 16:08, Christophe Demarey wrote:
Le 17 mars 2015 à 15:28, Stephan Eggermont a écrit :
That results in scheduled. The first time, it resulted in two builds being scheduled. After trying again, one build was scheduled. After committing again, no build was scheduled.
then, the problem should be investigated on the Smalltalkhub side. It would be good to have a test button there and be able to get the feedback. Without that, difficult to say what is wrong
I find it interesting that the missing build gets triggered after triggering a build with a web browser, and especially that a normal curl/wget does not work. Which projects actually use this build trigger?
Not a lot as it is a new feature. I use it for another project and works well. I'm not aware of other projects using it.
Versionner still uses both url trigger and this one.
Good catch, I forgot to remove the url trigger. I just updated it.
participants (3)
-
Ben Coman -
Christophe Demarey -
Stephan Eggermont