提交jenkins自动化流水线
This commit is contained in:
+8
-17
@@ -40,7 +40,7 @@ pipeline {
|
||||
stage('清理旧构建') {
|
||||
steps {
|
||||
sh "rm -rf dist/" // 清理 UniApp 打包生成的 dist 目录
|
||||
sh "rm -rf ${env.ARCHIVE_PATH}" // 清理 上次的归档文件
|
||||
sh "rm -rf ${env.ARCHIVE_PATH}" // 清理 上次的构建文件
|
||||
}
|
||||
}
|
||||
// stage('安装依赖') {
|
||||
@@ -163,22 +163,13 @@ pipeline {
|
||||
}
|
||||
stage('导出IPA安装包') {
|
||||
steps {
|
||||
script {
|
||||
// 导出 IPA 命令(自动从归档文件生成)
|
||||
def exportCommand = [
|
||||
"xcodebuild -exportArchive",
|
||||
"-archivePath ${ARCHIVE_PATH}",
|
||||
"-exportPath ${APP_DIR}/build",
|
||||
"-exportOptionsPlist ${EXPORT_OPTIONS_PLIST}",
|
||||
"-allowProvisioningUpdates"
|
||||
].join(' ')
|
||||
|
||||
echo "开始导出IPA:${exportCommand}"
|
||||
sh(exportCommand)
|
||||
|
||||
// 查看生成的文件
|
||||
sh "ls -la ${APP_DIR}/build/"
|
||||
}
|
||||
sh '''
|
||||
xcodebuild -exportArchive \\
|
||||
-archivePath ${ARCHIVE_PATH} \\
|
||||
-exportPath ${APP_DIR}/build \\
|
||||
-exportOptionsPlist ${EXPORT_OPTIONS_PLIST} \\
|
||||
-allowProvisioningUpdates
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user