Hi folks
I am trying to use Bitbucket Pipelines to build my Android App and I am struggling with a custom script I wrote to avoid having everything in the .yml file.
This is my error:
chmod +x ./build-debug.shchmod: changing permissions of ‘./build-debug.sh’: Operation not permitted
This is my bitbucket-pipelines.yml
image: uber/android-build-environment:latest
pipelines:
pull-requests: '**':
- step:
name: "Build DEBUG and run Unit Tests"
caches:
- gradle
script:
- echo "START script build-debug.sh"
- chmod +x ./build-debug.sh
- ./build-debug.sh
- echo "END script build-debug.sh"
artifacts: - app/build/outputs/apk/debug/*.apk
How can I solve this and make build-debug.sh executable?
Hey @azolliker
Looks like your config is slightly incorrect. It should be
chmod +x build-debug.sh
instead of
chmod +x ./build-debug.sh
Let me know if that fixes things :)
Hi @Aneita
Sorry for the late answer. It works for me with following setting:
image: mingc/android-build-box:latest pipelines: pull-requests: '**': #this runs as default for any branch not elsewhere defined - step: name: "Build [DEBUG] and run Unit Tests" caches: - gradle - gradlewrapper - androidavd script: - echo "START script build-debug.sh" - /bin/bash build-debug.sh - echo "END script build-debug.sh - artifacts we [DEBUG] build can be downloaded..." artifacts: - app/build/outputs/apk/debug/*.apk
definitions: caches: gradlewrapper: ~/.gradle/wrapper androidavd: $ANDROID_HOME/.android/avd
I don't even need the `chmod` any more :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.