3
votes

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 should 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?

3
Just to check, have you tried wget just from the command line, rather than in the post-commit hook? - Mark Longair
Yes, i was trying from the command line first before going to the hassle of adding it as a hook. I added my PC's IP as the trigger address whilst doing this too. - Chris

3 Answers

1
votes

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 :)

1
votes

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

0
votes

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)