竹子-建立我的请求 [英] bamboo - build my pull request

查看:64
本文介绍了竹子-建立我的请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当git请求请求时,我试图触发Bamboo的构建.我可以将webhook信息发送到Bamboo,但是与其构建适当的用sha-label标记的签入,它只是构建了"master"分支.

Im trying to trigger builds in bamboo when a pull request comes into git. I can send the webhook info to bamboo but instead of building the appropriate sha-labeled checkin it just builds the 'master' branch.

这是否需要对Bamboo进行一些自定义git设置?到目前为止,我还没有看到任何简单的东西.

Does this require some custom git setup to bamboo? Im not seeing anything straightforward so far.

在我的上一场演出中,我们使用了詹金斯(Jenkins),而且看起来还不错.我通过请求将sha-1传递给竹子.现在,我只需要说服它使用它即可.

In my last gig we used Jenkins and it seemed to tie together pretty well. I'm passing the sha-1 to bamboo with the pull request. Now I just need to convince it to use it.

推荐答案

结果是,技巧是从git中捕获请求请求的ID,然后使用它从git中检出相应的版本.

Turns out the trick is to capture the id of the pull request from git and use this to checkout the appropriate version from git.

此处.我最终使用php来解析git钩子的输出.

Inspiration from here. I ended up using php to parse the output from the git hook.

使用它从git(在您的竹盒子上)中获取正确的位:

Use this to get the right bits from git (on your bamboo box):

cd ${bamboo.build.working.directory}
git fetch https://github.com/person/some_util +refs/pull/${bamboo.pull_num}/merge:
git checkout FETCH_HEAD

这篇关于竹子-建立我的请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆