You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hi everyone,
I am trying to build release-signed apk using bitbucket pipeline. I am able to make release build but not sure how to sign it using BB pipeline. I have following queries here
1. Where to store .keystore file for signing
2. How to use it in bitbucket-pipeline.yaml file
Hi everyone,
Just answering my own question
1. Encode keystore file into base 64 (can use terminal to do same)
base64 > keystore_file
2. Create a secure repo variable and store the base64 value
3. Decode keystore file during build process
echo "$SIGNING_JKS_FILE" | base64 -d > keystore_file
Since this is secure variable it will not be printed anywhere
4. Now we can go ahead with our normal build process.
Hi @Manish Kumar do we not required to give any keystore passwords , keystore aliases etc. ?
Will it create a signed apk without it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. Encode keystore file into base 64 (can use terminal to do same)
base64 > keystore_file
What is the exact command ?
This just hangs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Keshava11
You need to create secure repo variable for all credentials like KEYS_STORE_ALIAS, KEY_STORE_PASSWORD etc. and utilise these environment variable during signing. Since it's secured repo variable it will not be disclosed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Keshava11
base64 works fine on Mac but you can utilise equivalent command on different OS.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Manish Kumar I am facing issue in generating base64 content from my keystore file
I have tried using both git bash and command prompt to generate the content but it hangs .
Also , is there a way to link these repository variables to build.gradle file where few variables can be used.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Bitbucket pipeline is of now use without one able to generate these repository variables
starting with the base64 encode content of keystore file which doesn't get generated.
I am on windows and also running ubuntu as guest on VirtualBox . In none of the OS, this base64 encoded content of keystore file getting generated.
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.
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.
My BASE64 file produced with
base64 keystore_file > keystore_file.txt
has newlines.
If I manually read that in and echo it out then it is fine: `echo "$SIGNING_JKS_FILE" | base64 -d > keystore_file`
But BitBucket secrets don't accept a new line, instead replacing with a space. This then produces `base64: invalid input`
Not yet sure how to get around this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In case anyone has the same problem as I did, I fixed the multiline issue with:
echo "$SIGNING_JKS_FILE" | sed -e"s/ /\n/g" | base64 -d > keystore_file
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.