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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,559,686
Community Members
 
Community Events
185
Community Groups

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
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 10, 2019

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
AUG Leaders

Atlassian Community Events