Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 10-05-2011, 03:23 AM   #1
LQ Newbie
Registered: Oct 2011
Location: Stockholm, Sweden
Distribution: OS X and LInux
Posts: 4

Rep: Reputation: Disabled
Question Trigger jenkins build with URL trigger when using git?

I have a server with jenkins setup to build my projects in my git repos. I trying to make jenkins build the project every time i push to the server so i get a new build every time i build.

jenkins have some options for this but not for git. (i canīt find any )

i can find this:

Configuring automatic builds
Builds in Jenkins can be triggered periodically (on a schedule, specified in configuration), or when source changes in the project have been detected, or they can be automatically triggered by requesting the URL:

This allows you to hook Jenkins builds into a variety of setups. For more information (in particular doing this with security enabled), see Remote access API.

Builds by source changes
You can have Jenkins poll your Revision Control System for changes. You can specify how often Jenkins polls your revision control system using the same syntax as crontab on Unix/Linux. However, if your polling period is shorter than it takes to poll your revision control system, you may end up with multiple builds for each change. You should either adjust your polling period to be longer than the amount of time it takes to poll your revision control system, or use a post-commit trigger. You can examine the Polling Log for each build to see how long it took to poll your system.

Alternatively, instead of polling on a fixed interval, you can use a URL trigger (described above), but with /polling instead of /build at the end of the URL. This makes Jenkins poll the SCM for changes rather than building immediately. This prevents Jenkins from running a build with no relevant changes for commits affecting modules or branches that are unrelated to the job. When using /polling the job must be configured for polling, but the schedule can be empty.
if i put in my browser and push enter, it build my project, but i want it to build when pushing, but i does not.

But i don't know if this is any help, and I'm kind of lost here. i appreciate all help i can get or hints how to make it work!


Last edited by jonizen; 10-05-2011 at 03:25 AM. Reason: missed some info
Old 10-14-2011, 01:07 PM   #2
Registered: Jan 2005
Location: Munich, Germany
Distribution: SuSE
Posts: 186

Rep: Reputation: 25
If you can tell git to run a shell script upon push, you can make it call a
or maybe "wget" if you don't have curl.
Cheers, Tom.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do use htaccess to trigger an error 403 when a url contaiins a direction code? Usalabs Linux - Server 2 06-06-2008 04:07 PM
trigger 0.5.1.c mirto Slackware 2 09-08-2005 06:34 AM
How do I trigger ctrl+z via a script? closet geek Linux - General 1 05-31-2005 06:53 PM
Is it possible to have PHP trigger a C program ? lostboy Programming 4 07-13-2003 11:20 AM
PostgreSQL trigger? playroll Linux - Software 4 03-29-2003 02:50 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration