Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bamboo Artifacts path

Daniel Frey July 8, 2014

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

0 votes
Deleted user July 8, 2014

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.

Daniel Frey July 8, 2014

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

Deleted user July 8, 2014

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.

Like NagiReddy1234 likes this
Daniel Frey July 9, 2014

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.

Deleted user July 9, 2014

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
TAGS
AUG Leaders

Atlassian Community Events