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

Not able to deploy to Bitbucket Downloads from Pipelines

julianonunes May 22, 2017

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>

  

1 answer

1 accepted

1 vote
Answer accepted
julianonunes May 22, 2017

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events