I am developing an android app and it is managed on the Bitbucket. I tried to use the "Pipeline" feature of the Bitbucket.
I found some references for it.
My first step is very simple. I just want to build "APK" file and upload it into the Bitbucket Downloads
I generated the config file like below:
<span>image</span><span>:</span><span> mingc</span><span>/</span><span>android</span><span>-</span><span>build</span><span>-</span><span>box</span><span>:</span><span>latest
pipelines</span><span>:</span>
<span>default</span><span>:</span>
<span>-</span><span> step</span><span>:</span><span> script</span><span>:</span>
<span>-</span><span> chmod </span><span>+</span><span>x gradlew
</span><span>-</span> <span>./</span><span>gradlew assembleDebug
</span><span>-</span><span> curl </span><span>-</span><span>X POST </span><span>--</span><span>user $</span><span>{</span><span>BB_AUTH_STRING</span><span>}</span> <span>"https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads"</span> <span>--</span><span>form files</span><span>=@</span><span>"./app/build/outputs/apk/debug/*.apk"</span>When I run this Pipeline, Build is successful. But the APK file is not uploaded into the "Downloads" of Bitbucket.
The error log is very simple:
<span>+</span><span> curl </span><span>-</span><span>X POST </span><span>--</span><span>user </span><span>"${BB_AUTH_STRING}"</span> <span>"https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads"</span> <span>--</span><span>form files</span><span>=@</span><span>"./app/build/outputs/apk/debug/*.apk"</span>
<span>Warning</span><span>:</span><span> setting file </span><span>./</span><span>app</span><span>/</span><span>build</span><span>/</span><span>outputs</span><span>/</span><span>apk</span><span>/</span><span>debug</span><span>/*.apk failed!</span>What's wrong? What should I do?