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. http://pubs.vmware.com/vfabric53/index.jsp?topic=/com.vmware.vfabric.tc-server.2.9/admin/cli.html

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

This widget could not be displayed.

Daniel,

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 ${bamboo.build.working.directory}/<path to artifact>. The <path to artifact> will be based on the pattern used to create the shared artifact.

Can ${bamboo.build.working.directory}/<path to artifact> be something like ${bamboo.build.working.directory}/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 ${bamboo.build.working.directory}/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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published yesterday in Marketplace Apps

The 7 hacks of highly successful automation

...there's anything I've learnt from working, it's that people are lazy! No offense to anyone reading this, but it's true and we can all admit it. The easier you make something for someone, the more...

82 views 0 8
Read article

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