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