Download latest successful artifact

How can I get the latest successful artifact from bamboo?

The following is provided:

https://*.jira.com/builds/browse/TC-TESTS/latestSuccessful

and i can get:

https://*.jira.com/builds/browse/TC-TESTS/latest/artifact/SVNREVISION/SVN-Revision/svn_revision

but not

https://*.jira.com/builds/browse/TC-TESTS/latestSuccessful/artifact/SVNREVISION/SVN-Revision/svn_revision

Is this supported or do I have to scrape the REST API?

3 answers

1 accepted

Accepted Answer
2 votes

Just scraped the REST API results:

https://*.jira.com/builds/rest/api/latest/result/PLAN-JOB?max-results=1&buildstate=Successful

You can now just do:

https://*.jira.com/builds/rest/api/latestSuccessful/artifact/SVNREVISON/SVN-Revision/svn_revision

But with the newer Bamboo REST API you can get the revision number directly from the API.

Nice share. thank u Matt

As at 6.5 I used, from this example YML plan spec

---

project:
  key: DS
  plan:
  key: DSCM
  name: Configuration Management

<snip>
      artifacts:
      - name: cm
      path: '*.cm'

used the following command, note the combination of project and plan key.

curl '<url>/browse/DS-DSCM/latestSuccessful/artifact/shared/cm/example.cm'

Suggest an answer

Log in or Sign up to answer
Community showcase
Published 12 hours ago in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

160 views 0 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