It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to use variables in a repository's file pattern field


As part of a build, I have configured bamboo to check out our source from a git repository.  The git repo contains a number of different services, all stored in different subdirectories (structure ./{service-name}).  For the sake of this question, lets use a service called 'my-service' as an example.  Currently the repository is configured to only include files in `^my-service/.*` (the 'File Pattern' in the advanced options of the repository configuration).  However, I'd like to move the 'my-service/' value to a plan variable called `SERVICE_SOURCE_PATH`.

I've tried using the value `^${bamboo.SERVICE_SOURCE_PATH}.*`.  However, this is not accepted as a valid regular expression.  The user at tried escaping the value, but it seems it was just taken literally.

Does anybody know whether it is possible to use a plan variable in the repository configuration's File Pattern field?  And if so, the correct syntax?


1 answer

1 accepted

0 votes
Answer accepted

This field doesn't support variables

Thanks for the fast response, Alexey.  Do you know if there are plans to add support for variables in this field?  I think it would be very useful.

I don't think we will implement it soon. You can watch and vote on

Thanks for that.  I'll add my vote smile

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bamboo

Unable to add or edit Bitbucket Cloud repository in Bamboo

On 31 May, a GDPR-related change went live in the Bitbucket Cloud API that resulted in users not being able to create or edit Bitbucket Cloud Linked repositories in Bamboo. This API update removed t...

1,409 views 2 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you