Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Incorrect revision while building a branch using plan branches

Alex Koshulian April 4, 2018

Hi!

I have the following scheme of the SVN repository:

https://some_repo/svn/trunk

https://some_repo/svn/branches

I try to use plan branches according to the guide: https://confluence.atlassian.com/bamboo/using-plan-branches-289276872.html

While building a branch, I found that Bamboo uses the last committed revision for the whole repo (i.e. https://some_repo/svn/) instead of the last revision for the current branch.  This revision may have been committed to another branch or trunk. Thus, all bamboo variables are set to the incorrect revision number, and I have not got any clue how to overcome this issue. I  actually need the correct revision of the branch being built for the following use in custom build scripts. There is no way to use svn commands because I use source export instead of checkout.

Thanks in advance.

2 answers

1 accepted

1 vote
Answer accepted
Foong
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 9, 2018

Bamboo does not show branch/tag revision for Subversion repository.

Please vote for the following feature requests:

https://jira.atlassian.com/browse/BAM-10396

https://jira.atlassian.com/browse/BAM-4800

Alex Koshulian April 9, 2018

Thank you! This is the cause of the problem.

0 votes
Minh Tran
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 5, 2018

@Alex KoshulianCan you tell me how you configure your linked repository to your svn?

You should not use bamboo variables to point to revision number. Revision number should be picked up from the linked repository configuring with a branch and it should be the latest one.

Bamboo should support for that out of the box

When you have this one you can write the revision to a temporary file and that can be read from the next custom build script task

Alex Koshulian April 6, 2018

Thank you for your reply!

I try to use that bamboo variable for the internal purposes. For example, to include a revision number into artifact file name as well as build number.

The structure of the SVN repository is the following:

https://some_repo/svn/trunk

https://some_repo/svn/branches/branch1

https://some_repo/svn/branches/branch2

....

etc.

The https://some_repo/svn/trunk URL is added on the Repositories tab in the Bamboo plan configuration. If I need to add a new branch, I use the Branches tab. Thus, a single plan may build the trunk as well as any of the branches available. However, I observe the above mentioned problem with bamboo.planRepository.<position>.revision variable, viz. this variable in the build of branch 1 may take a value of the revision committed to any other branch or even trunk and vice versa....

I did not configured any linked repositories.

Minh Tran
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 6, 2018

Linked repository should support you to run against different branches. You don't need to manually do like that :)

Alex Koshulian April 6, 2018

Thanks, but I do not understand at all how it can resolve the problem with revision set in the bamboo variable, whether they're gonna be correct with linked repository?  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events