From cb78293db7f441613ea82a429327d734ccd8aee9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 25 Feb 2020 15:42:54 +0100 Subject: [PATCH] use Android keystore from Jenkins credentials MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This way we don't have to store it on individual CI hosts. Signed-off-by: Jakub SokoĊ‚owski --- android/app/build.gradle | 1 - ci/Jenkinsfile.android | 2 -- ci/android.groovy | 4 ++++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 46e778575e..d98971c651 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -244,7 +244,6 @@ android { release { // Caution! In production, you need to generate your own keystore file. // see https://facebook.github.io/react-native/docs/signed-apk-android. - signingConfig signingConfigs.debug minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" signingConfig signingConfigs.release diff --git a/ci/Jenkinsfile.android b/ci/Jenkinsfile.android index d09cf56c75..5be6bca9c7 100644 --- a/ci/Jenkinsfile.android +++ b/ci/Jenkinsfile.android @@ -29,8 +29,6 @@ pipeline { BUILD_ENV = 'prod' NIX_CONF_DIR = "${env.WORKSPACE}/nix" FASTLANE_DISABLE_COLORS = 1 - /* since we are mounting it we need to specify location */ - STATUS_RELEASE_STORE_FILE = '/home/jenkins/status-im.keystore' /* We use EXECUTOR_NUMBER to avoid multiple instances clashing */ LEIN_HOME = "/var/tmp/lein-${EXECUTOR_NUMBER}" /* coverage report identification */ diff --git a/ci/android.groovy b/ci/android.groovy index b7587c3e23..1b603ae52f 100644 --- a/ci/android.groovy +++ b/ci/android.groovy @@ -25,6 +25,10 @@ def bundle() { /* credentials necessary to open the keystore and sign the APK */ withCredentials([ + file( + credentialsId: 'status-im.keystore', + variable: 'STATUS_RELEASE_STORE_FILE' + ), string( credentialsId: 'android-keystore-pass', variable: 'STATUS_RELEASE_STORE_PASSWORD'