IOS Continuous Integration

Jenkins

Jenkins is a CI tool.

Install

brew update brew install jenkins

Run

brew services start jenkins
在瀏覽器中訪問http://localhost:8080/,根據(jù)提示進(jìn)行操作,直至出現(xiàn)Jenkins的操作界面

Creating your first Pipeline

  • 在左上角點擊New Item新建pipeline,輸入一個名字,選擇Pipeline,點擊OK
  • 在Pipeline中設(shè)置Definition為Pipeline script from SCM,設(shè)置SCM為Git,并添加倉庫地址
  • 創(chuàng)建Jenkinsfile文件,內(nèi)容示例
// Jenkinsfile (Declarative Pipeline)
pipeline {
    agent any 
    stages {
        stage('Stage 1') {
            steps {
                echo 'Hello world!' 
            }
        }
    }
}
  • 保存并提交,在Jenkins中點擊build now
  • build history中選擇并在Console Output中查看控制臺輸出

Add a webhook to the pipeline

Triggering a Jenkins build on push using GitHub webhooks

IOS

修改Jenkinsfile文件中的內(nèi)容來build iOS項目

pipeline {
    agent any 
    stages {
        stage('ready') {
            steps {
                sh 'echo "ready"'
            }  
        } 
        stage('build') {
            steps {
                sh 'xcodebuild -list -project "BullsEye/BullsEye.xcodeproj"'
            }
        }
    }
}
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

友情鏈接更多精彩內(nèi)容