Having Trouble with getArtifact

I'm trying to use the Bamboo CLI (I've tried v2.6.0 and v3.2.0) to retrieve an artifact. We've used the getArtifact action before, but I just created a new build (by cloning a job from which we were able to get an artifact) job to use it with. In order to verify that I have the basics correct, I executed the following successfully:

bamboo --action getLatestBuildNumber --build <my-clients-name>-VADI --server https://<server>/builds--user <username> --password <password> -v

When I try to get the artifact with a command like this:

bamboo --action getArtifact --file VCARS-1.0.0.war --build <my-clients-name>-VADI --artifact VCARS-1.0.0.war --server https://<server>/builds--user <username> --password <password> -v

I consistently get this response:

URL requested: https://<server>/builds/rest/api/latest/result/<my-clients-name>-VADI/2?os_authType=basic&expand=artifacts
Request type: GET
Content type: application/xml
Using basic authentication.
Response code: 200, message: OK, url: https://<server>/builds/rest/api/latest/result/<my-clients-name>-VADI/2?os_authType=basic&expand=artifacts

Remote error: Could not find artifact 'VCARS-1.0.0.war'
org.swift.common.cli.AbstractRemoteClient$RemoteRestException: Could not find artifact 'VCARS-1.0.0.war'

I can see that the artifact exists as part of the latest build (and I've tried specifying the build number to no avail).

Help!

1 answer

It seem that the --job qualifier is required. When I added --job JOB1, it started working.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,796 views 0 6
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