0

Is there a way to trigger a Jenkins' job to build through Eclipse. For example, when creating new branch from imported Github project in Eclipse after this created branch was pushed and committed to the Github repository a Jenkins' job will automatically build.

So far I already tried Mylyn with Hudson/Jenkins connector, could you suggest more?

  • Is the jenkins instance accessible from the internet you could do github webhooks(info available [here](https://thepracticalsysadmin.com/setting-up-a-github-webhook-in-jenkins/)). – AmeyaVS Dec 18 '17 at 11:09
  • this one is good, but I think this isn't applicable in the approach I am currently using. This is the scenario, every branch of my github repository has it's own designated jenkins job. – xerxesjunemark Dec 19 '17 at 07:45
  • You could setup a cron time to scan every minute. But then it is not the best way since it would be wasting a lot of the CPU cycles polling for changes. – AmeyaVS Dec 19 '17 at 07:46
  • Yes, that's the problem I first encounter my CPU Usage are always at 99% - 100% – xerxesjunemark Dec 19 '17 at 07:51
  • One way I could think is running a local git server which triggers the build on the local jenkins using the same git webhooks and it is always synchronized with the GitHub repo.(Just a suggestion) – AmeyaVS Dec 19 '17 at 07:53
  • I have this idea in mind, can you tell me if this is possible? In Eclipse I cloned the project in my github repository, from this project I created a new branch and it will trigger a Jenkins job to build (maybe a job generator to create a jenkins job for the branch). – xerxesjunemark Dec 19 '17 at 08:16
  • You can try to use the `jenkins cli` to do this. You can probably integrate it with eclipse. [Here](http://www.starkandwayne.com/blog/jenkins-builds-from-cli/) is a reference. – AmeyaVS Dec 19 '17 at 08:51

0 Answers0