This file contains hidden or 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
| stage('Inform Slack for success') { | |
| when { | |
| expression { | |
| return env.shouldBuild != "false" | |
| } | |
| } | |
| steps { | |
| slackSend color: "good", message: "*${env.JOB_NAME}* *${env.BRANCH_NAME}* job is completed successfully" | |
| } | |
| } |
This file contains hidden or 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
| post { | |
| failure { | |
| slackSend color: "danger", message: "*${env.JOB_NAME}* *${env.BRANCH_NAME}* job is failed" | |
| } | |
| unstable { | |
| slackSend color: "danger", message: "*${env.JOB_NAME}* *${env.BRANCH_NAME}* job is unstable. Unstable means test failure, code violation etc." | |
| } | |
| } |
This file contains hidden or 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
| lane :refreshJenkinsKeychain do | |
| delete_keychain(name: "jenkins") if File.exists? File.expand_path("~/Library/Keychains/jenkins-db") | |
| create_keychain( | |
| name: "jenkins", | |
| password: "jenkins", | |
| timeout: false, | |
| lock_when_sleeps: false, | |
| unlock: true | |
| ) | |
| end |
This file contains hidden or 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
| stage('Reinitialize jenkins keychain') { | |
| when { | |
| expression { | |
| return env.shouldBuild != "false" | |
| } | |
| } | |
| steps { | |
| sh "fastlane refreshJenkinsKeychain" | |
| } | |
| } |
This file contains hidden or 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
| docker run -d -v jenkins_home:/var/jenkins_home -p 8080:8080 -p 50000:50000 jenkins/jenkins:2.180 |
This file contains hidden or 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
| docker pull jenkins/jenkins:2.180 |
This file contains hidden or 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
| stage('Populate Jenkins Keychain') { | |
| when { | |
| expression { | |
| return env.shouldBuild != "false" | |
| } | |
| } | |
| steps { | |
| sh "fastlane matchPopulateJenkinsKeychain" | |
| } | |
| } |
This file contains hidden or 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
| lane :matchPopulateJenkinsKeychain do | |
| register_devices(devices_file: "./fastlane/devices.txt") | |
| match( | |
| type: "adhoc", | |
| app_identifier: [ | |
| "my.app.identifier" | |
| ] | |
| ) | |
| match( |
This file contains hidden or 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
| stage('Install Pods') { | |
| when { | |
| expression { | |
| return env.shouldBuild != "false" | |
| } | |
| } | |
| steps { | |
| sh "pod install --deployment --repo-update" | |
| } | |
| } |
This file contains hidden or 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
| stage('Increment build number') { | |
| when { | |
| expression { | |
| return env.shouldBuild != "false" | |
| } | |
| } | |
| steps { | |
| sh "fastlane incrementBuildNumberAndCommit" | |
| } | |
| } |