提交jenkins自动化流水线

This commit is contained in:
Home
2026-03-30 04:20:48 +08:00
parent 6b3ffd45aa
commit b45b11bcba
+8 -17
View File
@@ -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
'''
}
}
}