From 3ae5f87be3bd48af2920e9b39a64f05a49fbb7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Tue, 5 May 2020 13:32:09 +0200 Subject: [PATCH] ci: add Jenkinsfile for updating Play Store metadata MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- RELEASE.md | 11 ++++ .../Jenkinsfile.fastlane-clean} | 0 ci/tools/Jenkinsfile.playstore-meta | 55 +++++++++++++++++++ fastlane/Fastfile | 9 ++- 4 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 RELEASE.md rename ci/{Jenkinsfile.fastlane.clean => tools/Jenkinsfile.fastlane-clean} (100%) create mode 100644 ci/tools/Jenkinsfile.playstore-meta diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..c35797a1e6 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,11 @@ +# Description + +This document explains some of the steps that are involved in relseases. + +## PlayStore Metadata Updates + +You can update Play Store releae metadata using `fastlane android upload_metadata`. + +But that requires credentials necessary for accessing Play Store API. The simpler way is to edit files contained within [`fastlane/metadata`](metadata) and run the following CI job: + +https://ci.status.im/job/status-tools/job/update-playstore-metadata/ diff --git a/ci/Jenkinsfile.fastlane.clean b/ci/tools/Jenkinsfile.fastlane-clean similarity index 100% rename from ci/Jenkinsfile.fastlane.clean rename to ci/tools/Jenkinsfile.fastlane-clean diff --git a/ci/tools/Jenkinsfile.playstore-meta b/ci/tools/Jenkinsfile.playstore-meta new file mode 100644 index 0000000000..afd2a88c6c --- /dev/null +++ b/ci/tools/Jenkinsfile.playstore-meta @@ -0,0 +1,55 @@ +library 'status-react-jenkins@v1.1.1' + +pipeline { + agent { label 'linux' } + + environment { + LANG = 'en_US.UTF-8' + LANGUAGE = 'en_US.UTF-8' + LC_ALL = 'en_US.UTF-8' + TARGET = 'ios' + FASTLANE_DISABLE_COLORS = 1 + /* See nix/README.md */ + NIX_IGNORE_SYMLINK_STORE = 1 + /* avoid writing to r/o /nix */ + GEM_HOME = '~/.rubygems' + } + + options { + timestamps() + /* Disable concurrent jobs */ + disableConcurrentBuilds() + /* Prevent Jenkins jobs from running forever */ + timeout(time: 5, unit: 'MINUTES') + /* Don't keep more than 50 builds */ + buildDiscarder(logRotator(numToKeepStr: '50')) + } + + stages { + stage('Prep') { + steps { script { + nix.shell( + 'bundle install --gemfile=fastlane/Gemfile', + attr: 'shells.fastlane', + ) + } } + } + stage('Play Store Update'){ + steps { script { + withCredentials([ + string( + credentialsId: 'SUPPLY_JSON_KEY_DATA', + variable: 'GOOGLE_PLAY_JSON_KEY' + ), + ]) { + nix.shell( + 'bundle exec --gemfile=fastlane/Gemfile fastlane android upload_metadata', + keepEnv: ['FASTLANE_DISABLE_COLORS', 'GOOGLE_PLAY_JSON_KEY'], + attr: 'shells.fastlane', + pure: false + ) + } + } } + } + } +} diff --git a/fastlane/Fastfile b/fastlane/Fastfile index f1c3db8338..05aad647dd 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -289,7 +289,14 @@ platform :android do lane :upload_metadata do upload_to_play_store( skip_upload_apk: true, - json_key_data: ENV['GOOGLE_PLAY_JSON_KEY'] + skip_upload_changelogs: true, + json_key_data: ENV['GOOGLE_PLAY_JSON_KEY'], + # These don't matter much as we're not uploading any new builds + # and indeed, we're skipping changelogs. This is just so that + # the library can find what it thinks it needs and continue with + # the work we actually want it to do. + track: 'production', + version_code: '2020042307' ) end