There is a Java maven project with its source code managed by Gitbucket
. Having configured a maven item in jenkins
for the project.
And, now want to trigger auto build in jenkins when gitbucket receive a new commit, according to: https://plugins.jenkins.io/gitbucket
Here is what I have done:
Gitbucket
plugin.maven
project, and checked the option Build when a change is pushed to GitBucket
within Build Triggers
section.Current status:
Could build the project in jenkins by hand successfully.
But, when push a new commit to gitbucket, jenkins can't trigger a new build.
test hook
, would get a 403
response.Questions:
security token
field, where should the value from, is that relevant to this task?Thanks.
(With the help in comment, and trying out, kind of figured out the mechanism and could built automatically via webhook now.)
Mechanism - Jenkins's Gitbucket
plugin
repository url
under Source Code Management
.Tips:
So can't use ssh protocol in jenkins job's repository url
under Source Code Management
.
Because it won't match the url used by gitbucket's webhook, thus can't trigger build. Use http protocol instead.
In jenkins's job, the url
under Gitbucket
section.
It specify the home page url of the repo in gitbucket (not for git clone), it's mainly for link usage.
It's optional, if set, then there will be a link to the url in the job's page.