In anticipation of the start of the course "iOS Developer. Basic" we have traditionally prepared an interesting translation for you, and we also invite you to sign up for a free webinar, in which our experts will tell you in detail about the course program and also answer your questions.
Incorporating Continuous Integration (CI) and Continuous Delivery (CD) technologies into the development process is undeniably the only way to track the relevance of code changes and identify integration errors at the earliest stages. It is also the path to debugged builds that are almost immediately available for testing and ready to be sent to production even after significant code changes.
CI/CD , : -, , , , -, , // , .
, , ? Jenkins Fastlane - , , .
, , Jenkins Fastlane CI . , .
Jenkins Fastlane
, CI , , Jenkins Fastlane . , Jenkins - , Java, . Jenkins (Pipelines), , (Jobs), , , , , , , . , (), Fastlane.
Fastlane - , (iOS Android), , , , . Fastlane , Lanes, , , Actions, , .
, , , - iOS- Testflight, (, , , , ) . , Testflight :
a)
b) ,
?.
, Jenkins Fastlane . , , . , Jenkins , Jenkins - Github . Github, Xcode, SCM (Source Control Management), , Github, Credentials Plugin , .
Jenkins. , Testflight.
Jenkins () => New Item (Pipeline) (Job) Jenkins “Upload to Testflight”.
Configure , . .
Definition , Pipeline «Pipeline Script from SCM». (SCM), Git-.
- , Testflight, github, github.
, , .
«Save» ! Jenkins. !
Scripted Pipeline. , (stages), , . Testflight, , . , :
Testflight
, , Build with Parameters , , , :
, Build, , Jenkins Stage view:
, Testflight!
, , , . Console Output , , , .
, MyScript.groovy, deploy()
, :
1.
checkout
SCM, , Jenkins Pipeline.
stage('Checkout') {
checkout scm
}
2.
stage('Install dependencies') {
sh 'gem install bundler'
sh 'bundle update'
sh 'bundle exec pod repo update'
sh 'bundle exec pod install'
}
CocoaPods, pod install
, . - Bundler, Ruby. 2 , Bundler, Bundler , Gemfile . , , , Fastlane, , , Danger, ruby . pod repo update
, pod', , , pod update
, .
3.
stage('Reset Simulators') {
sh 'bundle exec fastlane snapshot resetsimulators --force'
}
, , , , .
, Fastlane . , Fastlane Lanes , Fastfile. , , .
iOS-, , « » .
4.
stage('Run Tests') {
sh 'bundle exec fastlane test'
}
. test
, Fastfile, :
lane :test do
scan(
clean: true,
devices: ["iPhone X"],
workspace: "ourproject.xcworkspace",
scheme: "productionscheme",
codecoverage: true,
outputdirectory: "./testoutput",
outputtypes: "html,junit"
)
slather(
coberturaxml: true,
proj: "ourproject.xcodeproj",
workspace: "ourproject.xcworkspace",
outputdirectory: "./testoutput",
scheme: "productionscheme",
jenkins: true,
ignore: [arrayofdocstoignore]
)
end
Scan , workspace ( ), scheme (), codecoverage ( ) , , devices (), , .
Slather , , , , (ignore).
Fastlane- ✨. , Jenkins. , , , , .
, .