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 "<span>CV_publications.pdf</span>f" already exists in `.../downloads`. This is my pipeline:
<span>CV_publications.pdf</span>
```
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
<span>Warning: setting file CV_publications.pdf failed!</span><span> <br>% Total % Received % Xferd Average Speed Time Time Time Current</span><span><br> Dload Upload Total Spent Left Speed</span><span> <br>0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0<br></span><span>100 155 0 0 0 155 0 7380 --:--:-- --:--:-- --:--:-- 7380<br></span><span>curl: (26) read function returned funny value</span><span>+ curl -X POST "<a href="https://%24%7BBB_AUTH_STRING%7D@api.bitbucket.org/2.0/repositories/%24%7BBITBUCKET_REPO_OWNER%7D/%24%7BBITBUCKET_REPO_SLUG%7D/downloads" target="_blank" rel="noopener nofollow noreferrer">https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads</a>" --form files=@"CV_publications.pdf"<br></span>
<span>Warning: setting file CV_publications.pdf failed!</span>
<span> <br>% Total % Received % Xferd Average Speed Time Time Time Current</span>
<span><br> Dload Upload Total Spent Left Speed</span>
<span> <br>0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0<br></span>
<span>100 155 0 0 0 155 0 7380 --:--:-- --:--:-- --:--:-- 7380<br></span>
<span>curl: (26) read function returned funny value</span>
What's happening here?
Thanks!
Hi Andreas,
Have you tried adding "-v" to the curl command to get more information about the error?
It looks like you're new here. Sign in or register to get started.