2
votes

What do you put into the system hook URL? I see a lot of examples but they look like JSON scripts to me.

I'm trying to configure gitlab to hook jenkins to create projects when projects are generated in gitlab. I'd also like builds to be run when a merge (pull) request is generated for a repo.

I've followed the steps outlined here for the gitlab hook plugin: http://doc.gitlab.com/ee/integration/jenkins.html

But it's still not generating builds on push requests. Perhaps i don't have something setup right?

2

2 Answers

2
votes

I have also tried and failed to configure Gitlab to integrate with Jenkins by following the instructions at http://doc.gitlab.com/ee/integration/jenkins.html#jenkins-service

For me the reason was that I didn't have Gitlab EE installed. The page specifically states: "The Jenkins project service code is only available in GitLab EE"

2
votes

I discovered by chance my answer. In gitlab under the project settings you can add the following hook to trigger a build on a pull request or commit.

http://gitlab.example.com/job/example_project/build?token=UserToken.

I believe I saw it in Jenkins.

Now i've installed the gitlab plugin and i've tried the build_commit? hook and some other hooks but i was running into other errors such as asking for repo location when i've provided it. This does the trick though and i'm happy enough for now.