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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

622 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you