LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 10-05-2011, 03:23 AM   #1
jonizen
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?


Hi!
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:

Quote:
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:

http://YOURHOST/jenkins/job/PROJECTNAME/build
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 http://www.e-ject.se:8080/jenkins/job/tidReg/build 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!

Regards
Jonizen

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

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.
 
  


Reply

Tags
git


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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


All times are GMT -5. The time now is 12:00 PM.

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