Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,367,708
Community Members
 
Community Events
168
Community Groups

Incorrect revision while building a branch using plan branches

Edited

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 Apr 09, 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

Thank you! This is the cause of the problem.

0 votes
Minh Tran Atlassian Team Apr 05, 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

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 Apr 06, 2018

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

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

Atlassian Community Events