How do I get Jenkins to build on push to a BitBucket git repository?

后端 未结 7 1138
一个人的身影
一个人的身影 2020-12-12 18:21

I have a git repository hosted on BitBucket, and have set up SSH authentication between the repository and my Jenkins server. I can build on Jenkins manually, but cannot ge

相关标签:
7条回答
  • 2020-12-12 18:50

    You can actually get this to work in Jenkins with the Bitbucket service, but it took some playing around to get it working.

    If you use authentication, you can grab an API token from one of the users that can create builds. I created a separate account just for Bitbucket. You'll need at least Jenkins 1.426 to use the API token. You can then use HTTP authentication with the API token as your password for the Bitbucket service.

    This is how mine is set up:

    Endpoint: http://[bitbucket]:[APITOKEN]@[www.example.com/jenkins/]

    Project Name: [NameOfMyJenkinsProject]

    Module Name: [empty]

    Token: [Token found in Jenkins project settings]

    After I set it up like this, I was able to use the token as well as authentication to enable push-triggered builds from Bitbucket.

    0 讨论(0)
提交回复
热议问题