I'm trying to setup a build that pulls artifacts from several other parent builds and am having some trouble figuring out how to correlate the branch "id" for a specific plan (the integer appended to the plan key) with the branch name. The variable $bamboo.repository.branch.name seems to only contain the branch name from the version control repo.
For example, I have two branches, master and release. master's "id" is 0 and the Plan name looks like MYPLAN0 while release's id is 1 and the plan name looks like MYPLAN1.
Is there a way to easily refer to branches in Bamboo by the version control branch name? Is there some variable that makes it easy to generate a URL to the corresponding branch of another Plan? Dependencies are capable of being linked based on plan name, but I can find no way to actually pull in artifacts.
Ideally, it'd be as simple as MYPLAN/branch/master or MYPLAN/branch/release and then all routes normally following MYPLAN could instead follow the branch name.
Oh, and there is a ticket in the Bamboo issues tracker that you might be interested in: https://jira.atlassian.com/browse/BAM-12154 - basically it is the same feature request you would like to have, isn't it? Might be a good idea to add yourself as a watcher/voter to that issue.
More or less that ticket would do what I'm asking for, yes. Will add myself as a watcher/voter.
Guess I'll try the API too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I'd try a REST api to obtain a proper branch-plan. AFAIK there is REST resource in Bamboo that for a given master-plan key and for a given branch name will return you in the response the relevant plan-branch key. Probably you could use that to craft the necessary urls by yourself... or maybe not.
The REST resources I'm thinking of are:
* http://docs.atlassian.com/bamboo/REST/4.2-SNAPSHOT/#idp85888 plan/{projectKey}-{buildKey}/branch/{branchName}
* http://docs.atlassian.com/bamboo/REST/4.2-SNAPSHOT/#idp113040 /plan/{projectKey}-{buildKey}/vcsBranches
regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.