These are chat archives for gitbucket/gitbucket

13th
Aug 2017
Yuusuke KOUNOIKE
@kounoike
Aug 13 2017 03:18
@devopskatas I'm using Jenkins GitHub Organization Folder plugin. Please show your more information about what you do.
DevOps Katas
@devopskatas
Aug 13 2017 06:10
I'd like to trigger a build on commit to a branch in GitBucket. I almost have the built-in GitHub plugin working, but I'm getting errors: Failed to add GitHub webhook for GitHubRepositoryName[host=127.0.0.1:29418,username=root,repository=web-storelist] java.lang.NullPointerException: There is no credentials with admin access to manage hooks on GitHubRepositoryName[host=127.0.0.1:29418,username=root,repository=web-storelist]
Yuusuke KOUNOIKE
@kounoike
Aug 13 2017 07:14
Does your job runs correctly? This message says Failed to add webhook automatically by Jenkins. It's not problem to run your job.
DevOps Katas
@devopskatas
Aug 13 2017 19:29
I can manually run the job no problem. All it does right now is a shell command to append the date to a file.
I want a commit to the master branch to trigger a build in Jenkins.
Yuusuke KOUNOIKE
@kounoike
Aug 13 2017 20:41
@devopskatas Did you add webhook to repository manually? Is it correct? (http://jenkins-server/github-webhook/, trailing / required)
DevOps Katas
@devopskatas
Aug 13 2017 20:42
I did add the webhook with the trailing slash, and got the 200 response from Jenkins
at this point it seems like a Jenkins problem, but I'm not finding much info on that particular error
Yuusuke KOUNOIKE
@kounoike
Aug 13 2017 20:46
@devopskatas Do you use GitHub Organization Folder or Multibranch Pipeline?
DevOps Katas
@devopskatas
Aug 13 2017 20:47
no I'm not using either of those, do they allow for a push build trigger?
Yuusuke KOUNOIKE
@kounoike
Aug 13 2017 20:48
Yes, but it requires writing job as Jenkinsfile
Jenkinsfile is pipeline job. see https://jenkins.io/doc/book/pipeline/
Yuusuke KOUNOIKE
@kounoike
Aug 13 2017 20:53
What type of job do you using?
DevOps Katas
@devopskatas
Aug 13 2017 20:53
Freestyle job
Yuusuke KOUNOIKE
@kounoike
Aug 13 2017 20:55
hmm, can you write job as pipeline?
DevOps Katas
@devopskatas
Aug 13 2017 20:56
I'd prefer not to, this is for a beginner's guide and pipelines are a little too complex for that level
Yuusuke KOUNOIKE
@kounoike
Aug 13 2017 20:58
hmm...
DevOps Katas
@devopskatas
Aug 13 2017 20:58
I'll try a few other things- first stop will be to try the same thing with an actual Github repo, to see if there is a difference
Seems like the problem has to do with Jenkins, the error is saying there's no credentials to manage the hooks, assuming that's within Jenkins
Yuusuke KOUNOIKE
@kounoike
Aug 13 2017 21:00
I think, https://developer.aiming-inc.com/infra/jenkins-github-webhook-collaboration/ is useful page, but it wrote in Japanese.
s/think/googled/ :worried:
DevOps Katas
@devopskatas
Aug 13 2017 21:02
thanks, Google's translation of that site works great!
It looks like auto-registration of the webhook requires a personal access token- and in GitHub that has Scopes...
GitBucket has access tokens, but no scopes
Yuusuke KOUNOIKE
@kounoike
Aug 13 2017 21:04
GitBucket's token can be treated as "all scope token".
Yuusuke KOUNOIKE
@kounoike
Aug 13 2017 21:12
hmm, that page says: There are three way for webhook. 1. Jenkins standard webhook, 2. Git plugin, and 3. GitHub Plugin.
DevOps Katas
@devopskatas
Aug 13 2017 21:12
I'll experiment with the standard Git plugin
and the GitHub
also looking through Jenkins source, seems like a repo config issue
Yuusuke KOUNOIKE
@kounoike
Aug 13 2017 21:13
I know some problem with GitHub plugin and GitHub Organization Folder plugin.
  1. It requires standard port (http => 80, https => 443)
  2. It requires /user/repo.git access. (not /gitbucket/user/repo.git)