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

How to use custom files in builds?

Anton Giertli
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 9, 2019

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