Untuk mengantisipasi dimulainya kursus "Pengembang iOS. Dasar", kami telah menyiapkan terjemahan yang menarik untuk Anda secara tradisional, dan kami juga mengundang Anda untuk mendaftar webinar gratis, di mana pakar kami akan memberi tahu Anda secara rinci tentang program kursus dan juga menjawab pertanyaan Anda.
Memasukkan teknologi Continuous Integration (CI) dan Continuous Delivery (CD) ke dalam proses pengembangan tidak dapat disangkal satu-satunya cara untuk melacak relevansi perubahan kode dan mengidentifikasi kesalahan integrasi pada tahap paling awal. Ini juga merupakan jalur untuk membangun debug yang hampir segera tersedia untuk pengujian dan siap untuk dikirim ke produksi bahkan setelah perubahan kode yang signifikan.
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. , , , , .
, .