Wildcards in Artifact locations and Working Sub Directory

I'm trying to set up many similar plans.
In order to copy them and not have to change all of them manually I want to use wildcards in directory names.

Eg. Two projects gba-vst-protokoll and gba-vst-psn both have webapps but with different names.
vstprotokoll-webapp and vstpsn-webapp.

In the compile Stage of the plans I want to publish an artifact containing the target directory of the webapp folder using an Artifact:

Name: webapp-target
Location: *-webapp/target
Copy Pattern: */
Shared: true

The build fails with this message:

Unable to publish artifact [webapp-target]: the source directory 
/home/bamboo/bamboo.home/xml-data/build-dir/GBA-PROTOKOLL-COMPILE/gba-vst-protokoll/*-webapp/target 
does not exist.

If I go to the server I can successfully reach the directory and see the expected content:

$ cd /home/bamboo/bamboo.home/xml-data/build-dir/GBA-PROTOKOLL-COMPILE/gba-vst-protokoll/*-webapp/target

$ pwd
/home/bamboo/bamboo.home/xml-data/build-dir/GBA-PROTOKOLL-COMPILE/gba-vst-protokoll/vstprotokoll-webapp/target

$ ls
classes  generated-sources

Edit: If I set the Location to vstprotokoll-webapp/target then the build runs (so the data is definitely there). It's just a pain to do this for 10 to 50 Projects...

Is it possible to use wildcards in directory / location names for artifacts?

Note: using a wildcard in the destination folder for an artifact works...

So I can have an artifact successfully copied to *-webapp/target but not from *-webapp/target?

The same question applies to Stage - Job - Task - Working Sub Directory.

I have a lot of projects that have a <name>-db directory out of which database patches need to run. I'd like to set up a task that runs in *-db so that I can copy this around and save setup times, and not be tied to the actual project name.

Cheers

Jack...

2 answers

1 accepted

This widget could not be displayed.

I opened a support request for this, and the answer ist to use Plan or Bamboo variable instead of wildcards.

Cheers

Jack...

This widget could not be displayed.

For reference, here is the juicy part of the support ticket (#BSP-6577):

My first idea is to use Bamboo Variables in Location and Destination fields

${bamboo.webappname}-webapp/target

and then give that variable a proper value on a Plan level.
Please let us know if that is viable solution.

Cheers
Krystian Brazulewicz
Atlassian Bamboo Development

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in United States

Local Atlassian Research Workshop opportunity on Sep. 28th

We're looking for participants for another workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sh...

34 views 0 0
View post

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you