Skip to content

Commit

Permalink
use nix shell for running fastlane ios clean
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Sokołowski <jakub@status.im>
  • Loading branch information
jakubgs committed Jun 14, 2019
1 parent 2204ad5 commit 658e5ca
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions ci/Jenkinsfile.fastlane.clean
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,45 @@ pipeline {
agent { label 'macos' }

environment {
LANG = "en_US.UTF-8"
LANGUAGE = "en_US.UTF-8"
LC_ALL = "en_US.UTF-8"
LANG = 'en_US.UTF-8'
LANGUAGE = 'en_US.UTF-8'
LC_ALL = 'en_US.UTF-8'
TARGET_OS = 'ios'
FASTLANE_DISABLE_COLORS = 1
}

options {
timestamps()
/* Disable concurrent jobs */
disableConcurrentBuilds()
/* Prevent Jenkins jobs from running forever */
timeout(time: 45, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '100'))
/* Don't keep more than 50 builds */
buildDiscarder(logRotator(numToKeepStr: '50'))
}

stages {
stage('Install Deps'){
steps {
sh ('bundle install --gemfile=fastlane/Gemfile')
}
stage('Prep') {
steps { script {
nix = load('ci/nix.groovy')
nix.shell('bundle install --gemfile=fastlane/Gemfile')
} }
}

stage('Clean Users'){
steps {
steps { script {
withCredentials([
usernamePassword(
credentialsId: 'fastlane-match-apple-id',
usernameVariable: 'FASTLANE_APPLE_ID',
passwordVariable: 'FASTLANE_PASSWORD'
),
]) {
sh ('bundle exec --gemfile=fastlane/Gemfile fastlane ios clean')
nix.shell(
'bundle exec --gemfile=fastlane/Gemfile fastlane ios clean',
keep: ['FASTLANE_APPLE_ID', 'FASTLANE_PASSWORD']
)
}
}
} }
}
}
}

0 comments on commit 658e5ca

Please sign in to comment.