Trigger Cloudbees Jenkins build upon commits to bitbucket git repo

本文详细介绍了如何通过Cloudbees、Bitbucket和Jenkins的集成,实现远程触发Jenkins构建的过程。包括配置Cloudbees、添加Bitbucket服务、设置授权令牌等步骤,并展示了使用CURL命令手动触发构建的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. On Cloudbees job configure, "Build Triggers" segment, check "Trigger builds remotely (e.g., from scripts)" box, and input any string in "Authentication Token" field, such as 123456.



 

2. On bitbucket repo "Admin" tab, select "Services" in left bar, add "Jenkins" service.

Input in "Endpoint" field  with the format:

https://[cloudbees username]:[cloudbees password]@[account].ci.cloudbees.com

for example,

https:// ryan%40mail.com:mypassword123@myaccount.ci.cloudbees.com

Input "Project name" field with your Cloudbees Jenkins job name.

Input "Token" field with what you set in step 1, for example 123456.


 

3. Push code to the repo on bitbucket, and you will find your job on Cloudbees automatically be triggered to build.

 

Reference:

http://blog.cloudbees.com/2011/08/api-token-in-jenkins-rest-api.html
http://felixleong.com/blog/2012/02/hooking-bitbucket-up-with-jenkins
http://confluence.atlassian.com/display/BITBUCKET/Setting+Up+the+Bitbucket+Jenkins+Service
https://bitbucket.org/site/master/issue/3290/problem-with-jenkins-services-integration
http://paste.pocoo.org/show/iSvLXJTMnZFAFDrpWKw0/
https://wiki.jenkins-ci.org/display/JENKINS/Authenticating+scripted+clients
http://wiki.cloudbees.com/bin/view/DEV/Accessing+Jenkins%20using%20HTTP%20Basic%20Authentication
https://cloudbees.zendesk.com/entries/405505-triggering-builds-upon-commits-to-github

https://cloudbees.zendesk.com/entries/405505-triggering-builds-upon-commits-to-github

 

使用CURL触发

 

https://[cloudbees username]:[cloudbees password]@[account].ci.cloudbees.com/job/[job]/build?token=[build token]

 for example:

https:// ryan%40mail.com:mypassword123@myaccount.ci.cloudbees.com/job/myjob/build?token=A84787dsaw
 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值