Hello guys, first time I ask a question here... I'm setting a pipeline for my android project where I would like to build and deploy ( so having a debug.apk ) my android app.
At this time I'm able to build the apk but can't find any way to deploy it, could someone help me?
Thank you!!
This is my code right now:
image: javiersantos/android-ci:latest
pipelines:
default:
- step:
script:
- export GRADLE_USER_HOME=`pwd`/.gradle
- chmod +x ./gradlew
- ./gradlew assembleDebug
Hi Marco,
When you say deploy in this case, what do you mean exactly? Push the APK to the Play store? Push it to firebase to run instrumentation tests?
Hello, sorry for the misunderstanding. Actually at the moment I would like to send the APK to a slack channel, I already know the Slack API to do that, but right now I can't find the folder of the APK, I can only build that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the ./gradlew assembleDebug command will build the APK and put it in the build folder for your app. I think by default this build folder will be somewhere like
{projectRoot}/app/build/outputs/apk/debug/app-debug.apk
If you run ./gradlew assembleDebug on your local machine, then check around that location you should see the apk. It will be in the same relative location when it is built using pipelines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But when I build it successfully then go to the repository and go to the path you mentioned, can't find nothing. Do you have a template for android build and maybe a deploy to bitbucket download center? Thank you very much
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The build wont actually commit the artefacts from the build to your repository that is why you can't see them in the repository (and you don't want to do this). What you want to do is add a command after the assemble command to the build script that will get the APK that you just built which will be around that location I posted above, and send that to slack using the API you have.
If for example you added:
ls ./app/build/outputs/apk/debug
as the last line of you script above, it should print out something like app-debug.apk
(the location may be slightly different so run ./gradlew assembleDebug on your local machine and have a look around there for the apk to get the exact location)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.