Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,101
Community Members
 
Community Events
165
Community Groups

Bamboo: Download multiple Artifact file

Is it possible to download an artifact generated by a build plan if it contains more than one file? We have artifacts that consist of multiple files and there seems to be no easy way to download them. When we click on the artifacts link we can see the artifact directory structure in the browser and download one file at a time, but there is no link to download the entire artifact all at once. Do you have any API which returns the list of filenames inside the directory structure?

1 answer

0 votes
Jimmy Seddon Community Leader Nov 13, 2021

Hello @Sriman Padmanaban,

Welcome to the Community!

I believe what you are looking for is: https://jira.atlassian.com/browse/BAM-12456

I would also agree with one of the workarounds listed in that request.  Which is to zip the directory of files as a part of your build process and have Bamboo save that zip file so you can download it as a single artifact.

If you are looking at the APIs, I'd recommend starting here: 
https://docs.atlassian.com/atlassian-bamboo/REST/6.2.3/#d2e1824

I hope that helps!

-Jimmy

Hello @Jimmy Seddon ,
Thanks for the response.
Yes, I understand that the workaround to download the file is to zip it and store it as a single artifact. However, I don't want to download all the files at once. All I need is an API giving me the list of filenames inside the Artifacts.

For Eg: I have an artifact called SampleMultipleFile. Inside the Artifact, I have 3 files say sample1.xml,sample2.xml,sample3.xml. If there is an API that can give me the list of file names based on some validation in file names i will download the necessary files. (Right now all I get is an HTML file that contains the file names)

Can you please let me know if there is an API for the same?

Jimmy Seddon Community Leader Nov 13, 2021

Hey @Sriman Padmanaban

As I mentioned previously, I'd start by looking at the API docs:

https://docs.atlassian.com/atlassian-bamboo/REST/6.2.3/#d2e1904

The above like with get build results metadata, you probably want to specifically expand the artifact listing.

From there, this API should allow you to retrieve specific artifacts:

https://docs.atlassian.com/atlassian-bamboo/REST/6.2.3/#d2e1824

I hope that helps!

Hello @Jimmy Seddon ,
Thanks for the quick response. 
Yes, I looked at your API

https://docs.atlassian.com/atlassian-bamboo/REST/6.2.3/#d2e1824

This API gives me the list of Artifacts that are created as a part of the Build Plan.

The response of this API gives me the metadata of artifacts.

https://docs.atlassian.com/atlassian-bamboo/REST/6.2.3/#d2e1904

Eg: 
```  {
"name": "test-multiplefile",
"link": {
"href": "http://Bamboourl/browse/TST-BEAG-29/artifact/shared/test-multiplefile/",
"rel": "self"
},
"producerJobKey": "TST-BEAG-TST-29",
"shared": true,
"size": 15562,
"prettySizeDescription": "15 KB"
} ``` 
It just give me the folder of the artifacts. 
I want to know the list of filenames inside the test-multiplefile folder.

Please help me on this.

Suggest an answer

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

Bamboo Data Center on Kubernetes

Hi, If you are running self-managed environments and looking to adopt modern infrastructure, Bamboo Data Center can now be deployed in a Kubernetes cluster. By leveraging Kubernetes, you can easily...

967 views 3 8
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