From 37d0ea12cee9de5516da77f1fc8011a8e429ee9a Mon Sep 17 00:00:00 2001 From: Chd Date: Wed, 28 Mar 2018 11:15:16 +0200 Subject: [PATCH] Remove inactive testflight users with jenkins Signed-off-by: Anton Danchenko --- Gemfile | 3 +++ Gemfile.lock | 6 ++++-- Jenkinsfile.fastlane.clean | 22 ++++++++++++++++++++++ fastlane/Fastfile | 4 ++++ fastlane/Pluginfile | 5 +++++ 5 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 Jenkinsfile.fastlane.clean create mode 100644 fastlane/Pluginfile diff --git a/Gemfile b/Gemfile index 7a118b49be..cdd3a6b349 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,6 @@ source "https://rubygems.org" gem "fastlane" + +plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') +eval_gemfile(plugins_path) if File.exist?(plugins_path) diff --git a/Gemfile.lock b/Gemfile.lock index e14e95ab08..73dce4d2de 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -16,7 +16,7 @@ GEM domain_name (0.5.20170404) unf (>= 0.0.5, < 1.0.0) dotenv (2.2.1) - excon (0.61.0) + excon (0.62.0) faraday (0.14.0) multipart-post (>= 1.2, < 3) faraday-cookie_jar (0.0.6) @@ -25,7 +25,7 @@ GEM faraday_middleware (0.12.2) faraday (>= 0.7.4, < 1.0) fastimage (2.1.1) - fastlane (2.87.0) + fastlane (2.88.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.3, < 3.0.0) babosa (>= 1.0.2, < 2.0.0) @@ -60,6 +60,7 @@ GEM xcodeproj (>= 1.5.7, < 2.0.0) xcpretty (>= 0.2.4, < 1.0.0) xcpretty-travis-formatter (>= 0.0.3) + fastlane-plugin-clean_testflight_testers (0.2.0) gh_inspector (1.1.3) google-api-client (0.13.6) addressable (~> 2.5, >= 2.5.1) @@ -145,6 +146,7 @@ PLATFORMS DEPENDENCIES fastlane + fastlane-plugin-clean_testflight_testers BUNDLED WITH 1.16.1 diff --git a/Jenkinsfile.fastlane.clean b/Jenkinsfile.fastlane.clean new file mode 100644 index 0000000000..6621739046 --- /dev/null +++ b/Jenkinsfile.fastlane.clean @@ -0,0 +1,22 @@ +env.LANG="en_US.UTF-8" +env.LANGUAGE="en_US.UTF-8" +env.LC_ALL="en_US.UTF-8" + +node ('macos1'){ + +stage('Git & Dependencies'){ + + checkout([$class: 'GitSCM', branches: [[name: 'develop']], + doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CleanBeforeCheckout']], + submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/status-im/status-react.git']]]) + + load "$HOME/env.groovy" +} + +stage('Clean Testflight Users'){ + + withCredentials([string(credentialsId: 'FASTLANE_PASSWORD', variable: 'FASTLANE_PASSWORD'), + string(credentialsId: 'APPLE_ID', variable: 'APPLE_ID')]) { + sh ('bundle install') + sh ('bundle exec fastlane ios clean')}} +} diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 3f10f94b41..8a7ad93b5a 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -18,6 +18,10 @@ platform :ios do ) slack(message: "New nightly build uploaded to iTunes Connect") end + desc "Remove inactive TestFlight users" + lane :clean do + clean_testflight_testers + end end diff --git a/fastlane/Pluginfile b/fastlane/Pluginfile new file mode 100644 index 0000000000..0ee9978e51 --- /dev/null +++ b/fastlane/Pluginfile @@ -0,0 +1,5 @@ +# Autogenerated by fastlane +# +# Ensure this file is checked in to source control! + +gem 'fastlane-plugin-clean_testflight_testers'