Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Utilising Ant copy pattern for multiple file types

Nadesh Ramanathan
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!
December 8, 2022 edited

Hi all,

I am looking to building a Bamboo artifact using the Ant copy pattern based on two file types. For argument sake, let's say I want all '.cpp' and '.xml' files from all directories and subdirectories (in practicality, I want more files but I'll keep it simple for the discussion here). I can't seem to combine these two patterns together: '**/*.cpp' and '**/*.xml'. At the moment, I am using with: '**/*', which copies unwanted files. 

Also, on a separate note, is there a way to include the '.git' folder in the Ant copy pattern on Bamboo. I see that in the Ant documentation I can remove excludes but would it apply to Bamboo and if so how? 

 

1 answer

1 vote
Eduardo Alvarenga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 8, 2022

Hello @Nadesh Ramanathan,

Welcome to Atlassian Community!

Multiple file patterns for artifact transfer are available on Bamboo 9.0+ releases. You can specify multiple patterns separated by a comma.

Apache Ant will exclude a series of patterns by default, including ".git" folders. This is documented on the following page:

To copy the ".git" folder as an artifact, add a script task at the end of the Job and move it from ".git" -> "git" and then use a pattern such as "**/git/**"

Best regards,

Eduardo Alvarenga
Atlassian Support APAC

--please don't forget to Accept the answer if the reply is helpful-- 

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, mindful member, mindful member badge, atlassian community, community kudos, community giveaway, atlassian swag, community values, empathy and kindness, badge challenge, atlassian learning, community engagement, swag giveaway

Earn a Badge, Win a Prize 🎁

Earning the Mindful Member badge proves you know how to lead with kindness, plus it enters you into a giveaway for exclusive Atlassian swag. Take the quiz, grab the badge, and comment on our announcement article to spread the good vibes!

Start here
AUG Leaders

Atlassian Community Events