提交jenkins自动化流水线
This commit is contained in:
+29
-11
@@ -65,6 +65,24 @@ pipeline {
|
||||
echo "✅ 版本号:${env.versionCode}"
|
||||
}
|
||||
}
|
||||
stage('安装证书 & 描述文件') {
|
||||
steps {
|
||||
sh '''
|
||||
# =============== 安装 p12 证书 ===============
|
||||
security unlock-keychain -p ${MAC_LOGIN_PWD} ~/Library/Keychains/login.keychain-db
|
||||
security import ${P12_FILE} -k ~/Library/Keychains/login.keychain-db -P ${P12_PASSWORD} -A
|
||||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k ${MAC_LOGIN_PWD} ~/Library/Keychains/login.keychain-db
|
||||
|
||||
# =============== 安装描述文件(一定成功) ===============
|
||||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
cp ${PROFILE_FILE} ~/Library/MobileDevice/Provisioning\ Profiles/
|
||||
|
||||
# 查看是否安装成功(日志里能看到)
|
||||
echo "✅ 描述文件已安装到系统目录"
|
||||
ls -la ~/Library/MobileDevice/Provisioning\ Profiles/
|
||||
'''
|
||||
}
|
||||
}
|
||||
// stage('打包uniapp') {
|
||||
// steps {
|
||||
// sh "npm run build:app-plus:${env.BRANCH_NAME}"
|
||||
@@ -81,17 +99,17 @@ pipeline {
|
||||
// }
|
||||
// }
|
||||
// ====================== 构建 IPA ======================
|
||||
stage('========== 🗑️清理旧构建内容 ==========') {
|
||||
steps {
|
||||
sh """
|
||||
xcodebuild clean \\
|
||||
-project ${APP_DIR}/${PROJECT_NAME}.xcodeproj \\
|
||||
-scheme ${SCHEME_NAME} \\
|
||||
-configuration ${CONFIGURATION}
|
||||
"""
|
||||
|
||||
}
|
||||
}
|
||||
// stage('========== 🗑️清理旧构建内容 ==========') {
|
||||
// steps {
|
||||
// sh """
|
||||
// xcodebuild clean \\
|
||||
// -project ${APP_DIR}/${PROJECT_NAME}.xcodeproj \\
|
||||
// -scheme ${SCHEME_NAME} \\
|
||||
// -configuration ${CONFIGURATION}
|
||||
// """
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
// stage('开始归档项目') {
|
||||
// steps {
|
||||
|
||||
Reference in New Issue
Block a user