Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Not able to pull the built artifact from one repository to another

Basavaraj B S December 10, 2023

Hello Team,

I am trying to pull/copy the built artifact from one repository to another repository, but i am unable to do .

Initially I used curl -LJO and -0 followed by https url  but it is not fetching the artifact (Artifact is saved in zip format). Later I followed one more approach which was given in the Atlassian documentation (i.e pushing artifact to download section of one repository and pulling the artifact form another repository using curl -X POST)

But the result is same. Need suggestion to achieve this task.deployment repository.pngartifact in download section.pngartifact is getting created.png

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 12, 2023

Hi @Basavaraj B S,

Could you please try using our API to download the file with a call as follows:

curl -s -L -O --user username:app-password https://api.bitbucket.org/2.0/repositories/workspace-id/repo/downloads/somefile.zip

You can add the command

ls -lah

in your yml file, right after the curl command, to check if the file is created.

I also see that the yml file you shared for the default pipeline has one artifact, the zip file. However, the last screenshot in your post that shows the Artifacts tab, has several other artifacts that are not defined in the yml file for the default pipeline. Please ensure you check the artifacts of a build that runs on the default definition after you change the curl command in your yml file.

Feel free to let me know how it goes and if you still need assistance!

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events