Last active
September 10, 2020 12:07
-
-
Save elenipapanik/bb2ea0538878ceb48798ccd26696128d to your computer and use it in GitHub Desktop.
Deploy.groovy - version1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def deploy() { | |
stage('Checkout') { | |
checkout scm | |
} | |
stage('Install dependencies') { | |
sh 'gem install bundler' | |
sh 'bundle update' | |
sh 'bundle exec pod repo update' | |
sh 'bundle exec pod install' | |
} | |
stage('Reset Simulators') { | |
sh 'bundle exec fastlane snapshot reset_simulators --force' | |
} | |
stage('Run Tests') { | |
sh 'bundle exec fastlane test' | |
} | |
stage('Build') { | |
withEnv(["FASTLANE_USER=fastlane_user_email_address"]) { | |
withCredentials([ | |
string([ | |
credentialsId:'match_password_id', | |
variable: 'MATCH_PASSWORD' | |
]), | |
string([ | |
credentialsId: 'fastlane_password_id', | |
variable: 'FASTLANE_PASSWORD']), | |
]) { | |
sh 'bundle exec fastlane build' | |
} | |
} | |
} | |
stage('Upload to TestFlight') { | |
withEnv(["FASTLANE_USER=fastlane_user_email_address"]) { | |
withCredentials([ | |
string([ | |
credentialsId: 'fastlane_password_id', | |
variable: 'FASTLANE_PASSWORD']), | |
]) { | |
sh "bundle exec fastlane upload_to_testflight" | |
} | |
} | |
} | |
stage('Cleanup') { | |
cleanWs notFailBuild: true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment