Is it possible to force a run of the Bamboo automatic branch detection?

Russell Howe August 19, 2012

I'm setting up automatic branch detection and want to fine-tune the regular expression which selects branches.

Is there a way to force a scan of the repositories? Making a regex change, then having to wait 5 minutes for another scan is not exactly a productive way to work!

7 answers

1 accepted

3 votes
Answer accepted
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 19, 2012

That should be:

http://host:8085/bamboo/chain/admin/detectBranches.action?planKey=PLAN-KEY

(Where the PLAN-KEY should be the plan key, not a job key., eg. PROJECT-PLAN , not PROJECT-PLAN-JOB)

Russell Howe August 19, 2012

Thanks, that appears to do the trick. You just saved me about an hour!

Per Samuelsson December 11, 2012

We'd like to use this as welll, but I can get it to work. Maybe I don't fully understand how to do this, since I'm rather new to the product (evaluating).

I'm trying to trigger the branch detection by sumbitting URLs like:

http://host:8085/bamboo/chain/admin/detectBranches.action?planKey=FOO1-FOO2

http://host:8085/bamboo/chain/admin/detectBranches.action?planKey=${FOO1-FOO2}

where FOO1 is our product name, and FOO2 is the name of the plan (and host being replaced by our host of course), but both results in errors from the server saying the page does not exist and a link that gets me back home.

Any help would be appreciated!

Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 11, 2012

Per, does the beginning of the URL look like the one you use to access Bamboo in the browser (so, does the protocol, port, host and context match)?

Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 11, 2012

This definitely works, we use it in several of our automated tests, which would otherwise fail.

Per Samuelsson December 11, 2012

@Przemek,

Thanks for taking the time.

I'm glad to hear it really should work, b/c I'd really like to use it eventually. But I'm also sad to say I can't get it to work still. :)

Anyway, after your post I set up the environment again, and I tried a combination of both URL-formats above and tested both with the protocol prefix (i.e. http:) and without - none worked though.

Here's my setup:

I run my Bamboo server locally, exposed via localhost (default port, i.e. 8085). I run the server in the console and as an administrator. It's on Windows 7 and I run Bamboo 4.3.2 (I think - the latest version anyway, downloaded some week ago).

I'm the single user defined in Bamboo, and logged in when trying. I have administrative rights.

My plan works against a test repository, hosted in Git. The name of the my project is GoodTimes and the plan name is IntegratedBranches. You'll see it in the URL's below. I've set up the plan to detect branches automatically, and it does so fine after the said 5 minutes.

I'm using Chrome when accessing Bamboo and I've tried the URLs both in seperate tabs and from the same tab as I'm using when browsing/administering the server.

The URL's I've tried:

localhost:8085/bamboo/chain/admin/detectBranches.action?planKey=GOODTIMES-INTEGRATEDBRANCHES

http://localhost:8085/bamboo/chain/admin/detectBranches.action?planKey=GOODTIMES-INTEGRATEDBRANCHES

localhost:8085/bamboo/chain/admin/detectBranches.action?planKey=${GOODTIMES-INTEGRATEDBRANCHES}

http://localhost:8085/bamboo/chain/admin/detectBranches.action?planKey=${GOODTIMES-INTEGRATEDBRANCHES}

Really hope this one doesn't come down to as some kind of typo on my part. :)

PiotrA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012
Per Samuelsson December 12, 2012

OK, update:

It suddenly stroke me that I could possibly see something in the server console, when the request was sent, and indeed I did find an error there. So at least my request reaches the server.

Here a snippet of the relevant error info:

Per Samuelsson December 12, 2012

@Piotr,

That did it - tested and confirmed it works. Thanks!

Maybe the original comment by Przemek should be updated, if the context used there will cause failures for others too? Or maybe I'm such a Bamboo newbie that everyone that reads it instantly knows this, in case I guess you can leave it as is. :)

Best regards,

PiotrA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 12, 2012

Ah, I'd leave this as is. The thing is that - AFAIK - if Bamboo is deployed into application container (like Tomcat), then usually it will be configured to have the context path non empty, i.e "http://host:8085/bamboo/{rest}". However if you use the so-called "standalone" version of Bamboo (bundled with Jetty application container), then it is configured by default to have an empty path, like "http://host:8085/{rest}".

cheers,

Per Samuelsson December 12, 2012

OK, seems fair enough to me.

Thanks for the support with this issue!

Best regards,

1 vote
markus_korbel November 5, 2014

Does this workaround still work for Bamboo 5.6.2?

0 votes
benson margulies December 30, 2013

It rejects with a security error, even if I tell wget to provider username and password.

0 votes
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 30, 2013

Use POST method

0 votes
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 30, 2013

The same thing should work.

0 votes
benson margulies December 30, 2013

What is the recipe for this for 5.3?

0 votes
PiotrA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 19, 2012
Russell Howe August 19, 2012

Thanks for the suggestion, but that results in a 404 page for me on Bamboo verson 4.1.2

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events