Bamboo Artifacts path

I am building a deployment plan that is expecting an artifact (a war file) that will be deployed to a Pivotal vFabric tcServer. I am using the Hyperic tcServer command line interface.

When setting up my deployment plan, added two Script tasks: 1 to undeploy the existing application and 1 to deploy the new application.

In the command for deploy-applications, I need to specify a --localpath command line switch that accepts the path to the artifact. The war artifact is shared from the previous build task and "downloaded" in the deployment task.

Is there a variable I can use to pluginto the --localpath (i.e. --localpath ${bamboo.artifcatPath})?

1 answer


What you'll need to do is used the 'Download Artifacts' task in your job where you have to access them with localpath. Then you can reference them using ${}/<path to artifact>. The <path to artifact> will be based on the pattern used to create the shared artifact.

Can ${}/<path to artifact> be something like ${}/tmp/tmp.war?

Yeah, that wouldn't be a problem. Think of the pattern that you use in the job that you originally created that shared artifact from. If you originally derived the artifact from <JOB1>/tmp/tmp.war, it would be stored on the server as /tmp/tmp.jar. When you download that artifact to use in JOB2, it would exist locally on your agent using the path <JOB2>/tmp/tmp.war or ${}/tmp/tmp.war when referenced in the job currently running.

There are ways to customize this if you want to use another path location (such as destination path in the download task), but this is the default behavior if no customization is specified. If no additional path were included in the original artifact creation, the artifact would be downloaded to the root of the job working directory.

Ah, i think i see my problem here. My war files, when they are built are built with a name similar to creditcard-2.0.2.war. The version gets embedded in the name, so that they can be sent to nexus for long term storage. So the name is never the same.

I see. If you are able to wildcard the path in your localpath argument, that would work. If not, you could write a shell script to find the full path for the war you need and write it to a Bamboo variable. Then you can use that variable as your localpath argument.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

169 views 4 1
Join discussion

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