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

Utilising Ant copy pattern for multiple file types

Nadesh Ramanathan December 8, 2022

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

Atlassian Community Events