提交jenkins自动化流水线
This commit is contained in:
+20
-3
@@ -11,6 +11,7 @@ pipeline {
|
||||
|
||||
SCHEME_NAME = 'HBuilder'
|
||||
CONFIGURATION = 'Release'
|
||||
ARCHIVE_PATH = "${APP_DIR}//build/HBuilder.xcarchive" //归档文件输出路径
|
||||
}
|
||||
stages {
|
||||
stage('打印环境变量') {
|
||||
@@ -73,14 +74,30 @@ pipeline {
|
||||
// }
|
||||
// }
|
||||
// ====================== 构建 IPA ======================
|
||||
stage('配置SDK & 赋予权限 & 编译IOS') {
|
||||
stage('========== 🗑️清理旧构建内容 ==========') {
|
||||
steps {
|
||||
echo "========== 🗑️清理旧构建内容 =========="
|
||||
sh """
|
||||
xcodebuild clean \\
|
||||
-project ${APP_DIR}/${projectName}.xcodeproj \\
|
||||
-scheme ${SCHEME_NAME} \\
|
||||
-configuration ${configuration}
|
||||
-configuration ${CONFIGURATION} \\
|
||||
MARKETING_VERSION=${versionName} \\
|
||||
CURRENT_PROJECT_VERSION=${versionCode} \\
|
||||
-destination 'generic/platform=iOS \\
|
||||
archive
|
||||
"""
|
||||
|
||||
}
|
||||
}
|
||||
stage('开始归档项目') {
|
||||
steps {
|
||||
sh """
|
||||
xcodebuild archive \\
|
||||
-project ${APP_DIR}/${projectName}.xcodeproj \\
|
||||
-scheme ${SCHEME_NAME} \\
|
||||
-configuration ${CONFIGURATION} \\
|
||||
-archivePath ${ARCHIVE_PATH} \\
|
||||
|
||||
"""
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user