提交jenkins自动化流水线
This commit is contained in:
Vendored
-3
@@ -40,9 +40,6 @@ pipeline {
|
||||
stage('读取 manifest 版本号 → 写入环境变量') {
|
||||
steps {
|
||||
script {
|
||||
// 1. 安装 json5(支持注释JSON)
|
||||
sh 'npm install json5 --registry=https://registry.npmmirror.com'
|
||||
|
||||
// 2. 读取并设置为 环境变量(全局可用)
|
||||
env.versionName = sh(
|
||||
script: '''
|
||||
|
||||
+11
-4
@@ -7,6 +7,9 @@ pipeline {
|
||||
UNIAPP_APP_ID = '__UNI__EDE0E52'
|
||||
APP_DIR = "Ios/HBuilder-Hello/HBuilder-Hello"
|
||||
ASSETS_DIR = "${APP_DIR}/Pandora/apps/${UNIAPP_APP_ID}/www"
|
||||
PROJECT_NAME = 'HBuilder-Hello'
|
||||
SCHEME_NAME = 'HBuilder'
|
||||
CONFIGURATION = 'Release'
|
||||
}
|
||||
stages {
|
||||
stage('打印环境变量') {
|
||||
@@ -35,9 +38,6 @@ pipeline {
|
||||
stage('读取 manifest 版本号 → 写入环境变量') {
|
||||
steps {
|
||||
script {
|
||||
// 1. 安装 json5(支持注释JSON)
|
||||
sh 'npm install json5 --registry=https://registry.npmmirror.com'
|
||||
|
||||
// 2. 读取并设置为 环境变量(全局可用)
|
||||
env.versionName = sh(
|
||||
script: '''
|
||||
@@ -77,7 +77,14 @@ pipeline {
|
||||
// ====================== 构建 IPA ======================
|
||||
stage('配置SDK & 赋予权限 & 编译IOS') {
|
||||
steps {
|
||||
echo "✅ 配置SDK & 赋予权限 & 编译IOS"
|
||||
echo "========== 🗑️清理旧构建内容 =========="
|
||||
sh """
|
||||
xcodebuild clean -workspace ${PROJECT_NAME}.xcworkspace \\
|
||||
-scheme ${SCHEME_NAME} \\
|
||||
-configuration ${configuration} \\
|
||||
clean
|
||||
"""
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user