Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

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

2 votes
Answer accepted

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.

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'

Nice share. thank u Matt

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo Data Center 8.1 is now available

G’day Bamboo customers, Bamboo DC 8.1 is now available with it the following features and programs: SAML 2.0, OpenID Connect, and Crowd SSO In order to help admins with a simplified user manage...

203 views 0 4
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