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,552,760
Community Members
 
Community Events
184
Community Groups

What can be used as Pattern when defining Artifacts?

Edited

I want to use simple Regex as Pattern, but it does not work.

 

I want to achieve somethink like "pre(con|dition)*"

So anything starting with precon and predition should match, but not for example pretest.

 

Is this even possible in Bamboo or can I just use the 3 mentioned here? https://confluence.atlassian.com/bamboo/pattern-matching-reference-301663849.html

 

Thanks in advance

2 answers

1 accepted

0 votes
Answer accepted
Richard White _TechTime_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Jul 17, 2020

Hi Markus,

Unfortunately, Bamboo uses ant path matching, not regex. I don't believe there is a way to satisfy that in a single artifact pattern.

The only workaround I can think of, would be to define two artifacts (one for precon and one for predition in your example). Obviously that would not work for every use case though.

Hi Richard, thanks for the reply, even if it is not satisfying...

 

How do I use the ant-patterns? Do I simply put the html-style syntax as pattern?

 

From the examples on the site you posted, I could achieve my goal with some file-exclusions.

Richard White _TechTime_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Jul 19, 2020

Unfortunately, I think you can only use the actual path matching part.

In you example, the best you could do would be:

pre* 

which would obviously match both precon and predition as well as pretest.

I don't think there is a way to include the exclusions like in the ant reference. The original link you provided from Atlassian is pretty much all of the syntax that you can use.

Hi Markus,

I was able to successfully use Bash-style brace expansion for this in my Maven-based project:

test/target/{*.log,test-logs/**,failsafe-reports/**}

 

I think the equivalent for your question would be:

pre{con,dition}*

 

I hope that helps!

This also works when defining the same Bitbucket Pipeline config for multiple branch name patterns. Thank you! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events