Looking for help to use Bitrise to build signed installable builds.
I’ve read through all the docs and followed those along (Upload and download keystore file).
I failed to get the updated special configs as explained here working, but I think using the sign-apk step
feels more elegant anyway. I feel like getting very close. But now it is complaining about my file not being valid.
Here is where I am:
I created a special “ci” Android buildType in gradle
that doesn’t include any signingConfig
:
android {
buildTypes {
// Mimic release settings. TODO: Enable minifyEnabled to run proguard once ci is setup
ci {
zipAlignEnabled true
minifyEnabled false
// No signingConfig. Let ci do sign step
}
This is the error output on running, all steps before are ok:
Configs:
- ApkPath: /bitrise/deploy/app-mock-ci-unsigned.apk
- KeystoreURL: ***
- KeystorePassword: ***
- KeystoreAlias: ***
- PrivateKeyPassword: ***
- JarsignerOptions:
Download keystore
Failed to download keystore, error: [Get /root/keystores/pvlse_release.keystore: unsupported protocol scheme ""]
| |
+---+---------------------------------------------------------------+----------+
| x | sign-apk@1.2.2 (exit code: 1) | 2.55 sec |
I’ve uploaded the keystore file to the Android keystore file section in the Code Signing tab. I had this release key for years and it doesn’t have a “jks” ending as in the docs, but a “.keystore” one. When reading the properties with the keytool
command I do get that it is a jks
keystore:
Keystore type: JKS
I so far could not find an answer how or if I need to convert the .keystore
file to a .jks
one. Maybe that would be a solution if such a conversion is possible?
Here is my bitrise workflow config showing the steps I’ve set up to run unit tests & build release using assembleCi
:
deploy:
steps:
- activate-ssh-key@4.0.2:
run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
- git-clone@4.0.11: {}
- cache-pull@2.0.1: {}
- install-missing-android-tools@2.2.0: {}
- gradle-unit-test@1.0.5:
inputs:
- unit_test_task: testCiUnitTest
- file-downloader@1.0.1:
inputs:
- destination: '"$HOME/keystores/project_release.keystore"'
- source: "$BITRISEIO_ANDROID_KEYSTORE_URL"
- gradle-runner@1.8.3:
inputs:
- gradle_file: "$GRADLE_BUILD_FILE_PATH"
- gradle_task: assembleCi
- gradlew_path: "$GRADLEW_PATH"
- sign-apk@1.2.2:
inputs:
- keystore_url: "$HOME/keystores/project_release.keystore"
- deploy-to-bitrise-io@1.3.12:
inputs:
- notify_user_groups: none
- cache-push@2.0.5: {}
Any input and help welcome. Thanks very much in advance!
Friederike