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

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

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
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...

807 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