I was following the example in https://confluence.atlassian.com/bitbucket/deploy-build-artifacts-to-bitbucket-downloads-872124574.html .
The curl code in the pipeline only works the first time, after that it provides an error, which is hard to google. I assume it is related to the fact that the file "CV_publications.pdf
f" already exists in `.../downloads`. This is my pipeline:
```
image: aergus/latex
pipelines:
default:
- step:
script:
- echo "Generating all CVs!"
- make
- echo "Done!"
- apt-get install -y curl
- curl -X POST "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"CV_publications.pdf"
```
and this is the pipeline error message:
```
curl -X POST "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"CV_publications.pdf"<1s
+ curl -X POST "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"CV_publications.pdf"
Warning: setting file CV_publications.pdf failed!
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0100 155 0 0 0 155 0 7380 --:--:-- --:--:-- --:--:-- 7380
curl: (26) read function returned funny value
```
What's happening here?
Thanks!
Hi Andreas,
Have you tried adding "-v" to the curl command to get more information about the error?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.