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
Community showcase
Published yesterday in Statuspage

194 years of downtime: looking back on incident data from 2018

Statuspage customers logged more than 194 years of collective incidents in 2018. That’s a whopping 87% increase from the  104 years logged in 2017 , and we aren’t even through December yet....

35 views 1 5
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