开发者

How to get atlassian bamboo to trigger a build automatically from a post commit hook

Trying to trigger atlassian bamboo 2.7 to do a build after we do commits to our git server.

Apparently I have to hit a certain api url with wget:

wget --no-check-certificate http://myserver.net/build/updateAndBuild.action?buildKey=ABC-DEF

However this does not work. When i run this command, nothing is returned in the http reply, and i've done the following as i shoul开发者_Go百科d have:

  • Configure the build strategy to triggered build mode
  • Set my IP address is the trigger IP address
  • Committed and pushed some new code

But it does nothing, any ideas?


It's hard to say anything without looking into server logs. My tip is: go to https://support.atlassian.com/browse/BSP and describe the problem there attaching server logs.

And yes I work for Atlassian :)


Take a look at the documentation regarding the post commit triggers:

http://confluence.atlassian.com/display/BAMBOO/Repository+Triggers+the+Build+when+Changes+are+Committed

http://confluence.atlassian.com/display/BAMBOO/Build+Services

You could try to use the REST Service to see if this works for you: /api/rest/updateAndBuild.action?buildKey=BAM-TRUNK

If this shouldn't resolve your issue, please create a support request as Krystian suggested.

Cheers, Jens


The simple fix would be to use Git bamboo web hook service.

If you want commits to automatically trigger builds:

Set up Github

Go to ur github repository->settings -> Webhooks & Services

Select "Bamboo" from the "Add service" dropdown

Base url: https://(compnayname).atlassian.net/builds

Build key: your Bamboo build plan key (goto plan summary the last part of URL is the build key)

Username: bamboo useranme (with build permissions)

Password: as specified.

Set up Bamboo

Add 'builder' to the users who can build the plan (Plan Configuration -> Permissions)

Add a trigger (Plan Configuration -> Triggers)

Description: trigger description

Repositories: Select the repo that needs to be build automatically

Trigger IP addresses: IP addresses of the repository server (you might try out leaving it blank as bamboo searches the default IP address)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜