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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.