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

How to use custom files in builds?

Hi,

 

I'd like to use custom settings.xml during my maven build. How do I upload custom files (i.e. settings.xml) so they can be used during bamboo build?

 

I can see possibility do define variables, but not custom files.

 

Do I actually need to make this file accessible as part of my bamboo agent?

 

Isn't there a possibility to upload a file from bamboo admin console?

 

Thanks.

1 answer

1 vote

Hello @Anton Giertli

Let me give you some insights through comments on your message:

I'd like to use custom settings.xml during my maven build. How do I upload custom files (i.e. settings.xml) so they can be used during bamboo build?

I understand your need here and to achieve this you will need to use a script task with commands to SCP, SFTP or WGET the file you need.

I can see possibility do define variables, but not custom files.

Yes, we don't have the option to add custom files. In part, I see that this design bring benefits on guiding users to have their data versioned which makes the builds predictable and reproducible with the same source code revision.

Do I actually need to make this file accessible as part of my bamboo agent?

I think the best approach would be adding this file to the source repository used in your build plan. If you want something temporary for testing purposes then you could use an extra plan repository or even the option shared above using a script task and commands. Wherever option you choose, you can use custom variables as flags to decide what file to pick in case you have multiple of them.

Isn't there a possibility to upload a file from bamboo admin console?

If I understood you correctly you are talking about the OS server terminal, right. Assuming this is the case, you can always do that if you know the right folder of your build. I don't advise you doing that since that would cause your build to be unpredictable with multiple different results for the same source code revision. This would cause trouble for other people to understand the results of that build. They would not know that extra files were added right away to the build folder using external tools.

There is an old improvement request, not very popular (explaining why this was not implemented), which suggests an improvement in the SCP task so it could also download files to the Bamboo server from an external location: [BAM-12230] Add support for downloading artifacts to the working directory via SCP.

I hope that answers your questions. Please let me know if there is anything that is not clear.

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...

674 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