Bitbucket Pipelines seems to be not replacing the parameters with actual values on curl command line. I've created an app password and an environment variable with the token, but can't make the copy work.
Here's my bitbucket-pipelines.yml:
image: uber/android-build-environment:latest pipelines: default: - step: script: - echo y - bash ./ci/build.sh - curl -X -v POST "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"app/build/outputs/apk/app-debug.apk"
And the curl output on Pipelines logs:
+ curl -X -v POST "https://${BB_AUTH_STRING}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"app/build/outputs/apk/app-debug.apk" % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (6) Could not resolve host: POST 0 9.9M 100 166 0 0 3772 0 --:--:-- --:--:-- --:--:-- 3772 <html> <head><title>400 Bad Request</title></head> <body bgcolor="white"> <center><h1>400 Bad Request</h1></center> <hr><center>nginx</center> </body> </html>
Here is the version of the curl command working:
curl -i -X POST --user "${BITBUCKET_REPO_OWNER}:${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads/" --form files=@"${new_name}" --verbose
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.