更新渠道和jenkins脚本

main
zhangaotian 2025-06-24 13:11:47 +08:00
parent c3e5a7494f
commit fd561d47d4
10 changed files with 120 additions and 38 deletions

View File

@ -0,0 +1,12 @@
# 宏定义列表,供脚本添加到 PlayerSettings 的宏定义中
Define_list:
- BanShu
# 应用包名
PackageName: "com.phxh.banshu.nld"
# 多语言配置
Language: "Lan_Default"
# 当前版本号
Version: "0.1.0"

View File

@ -0,0 +1,33 @@
# 宏定义列表,供脚本添加到 PlayerSettings 的宏定义中
Define_list:
- SDK_BILIBILI
- SDK_CRASHSIGHT # 崩溃监控 SDK 宏
- LOGIN_PHONE # BI
# 应用包名
PackageName: "com.phxh.nlddev.bilibili"
# 多语言配置
Language: "Lan_Default"
# 当前版本号
Version: "0.8.0"
# 构建资源远程上传路径
OssRemoteUploadPath: "oss://nld-pre/client_res/Build"
AssetsEndPoint: "oss-cn-hangzhou.aliyuncs.com"
# 阿里云 OSS 配置
ConfigAccessKeyId: "LTAI5tLQ97DLkYdVqNYoggbA"
ConfigAccessKeySecret: "pijrbePeoiEhIEcpbe8pfxDDk5yStx"
ConfigBucketName: "nld-bilibili-client-eiydedizmuzqxkyb"
ConfigURL: "http://eiydedizmuzqxkyb-cdn.kedrgame.com"
# http请求配置
AppAccessKey: "AUtRZGXsuPr3Y_9o"
AppKey: "n6WzdbkAk1fQEQgKgx8FvEedkr7u7i1orQmCC7XXS_M="
# 崩溃监控配置(仅 Android
CrashSight_Android:
id: "13b958be4c" # 崩溃上报的 App ID
key: "ad29aad9-dd49-4403-b774-af876f1a662a" # 崩溃上报的 Key

View File

@ -25,5 +25,5 @@ ConfigURL: "http://tuiqkbrtfjhuiaoz.kedrgame.com"
# 崩溃监控配置(仅 Android
CrashSight_Android:
id: "9e1297bfd2" # 崩溃上报的 App ID
key: "b36d6985-5891-440f-993b-ae1ed8e79ff8" # 崩溃上报的 Key
id: "669a94ce69" # 崩溃上报的 App ID
key: "d9412717-2416-4270-b8bc-f7a0805f988f" # 崩溃上报的 Key

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 5d3a1a06bb3704f41b04be4736003323
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 5d3a1a06bb3704f41b04be4736003323
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,28 @@
# 宏定义列表,供脚本添加到 PlayerSettings 的宏定义中
Define_list:
- SDK_TAPTAP # TapTap SDK 宏
- SDK_CRASHSIGHT # 崩溃监控 SDK 宏
# 应用包名
PackageName: "com.phxh.taptap.nld"
# 多语言配置
Language: "Lan_Default"
# 当前版本号
Version: "0.1.0"
# 构建资源远程上传路径
# OssRemoteUploadPath: ""
# AssetsEndPoint: ""
# 阿里云 OSS 配置
# ConfigAccessKeyId: ""
# ConfigAccessKeySecret: ""
# ConfigBucketName: ""
# ConfigURL: ""
# 崩溃监控配置(仅 Android
CrashSight_Android:
id: "9e1297bfd2" # 崩溃上报的 App ID
key: "ffeaeb80-b215-4e27-b647-0ff8c6aac5e1" # 崩溃上报的 Key

View File

@ -0,0 +1,28 @@
# 宏定义列表,供脚本添加到 PlayerSettings 的宏定义中
Define_list:
- SDK_TAPTAP # TapTap SDK 宏
- SDK_CRASHSIGHT # 崩溃监控 SDK 宏
# 应用包名
PackageName: "com.phxh.taptapdev.nld"
# 多语言配置
Language: "Lan_Default"
# 当前版本号
Version: "0.1.0"
# 构建资源远程上传路径
OssRemoteUploadPath: "oss://nld-dev-tuiqkbrtfjhuiaoz/client_res/Build"
AssetsEndPoint: "oss-cn-chengdu.aliyuncs.com"
# 阿里云 OSS 配置
ConfigAccessKeyId: "LTAI5tSoxnie6B5hot9PJVHC"
ConfigAccessKeySecret: "UF4mUjfxkE457WyfhKqSVOOn5uOB0H"
ConfigBucketName: "nld-dev-tuiqkbrtfjhuiaoz"
ConfigURL: "http://tuiqkbrtfjhuiaoz.kedrgame.com"
# 崩溃监控配置(仅 Android
CrashSight_Android:
id: "669a94ce69" # 崩溃上报的 App ID
key: "d9412717-2416-4270-b8bc-f7a0805f988f" # 崩溃上报的 Key

View File

@ -146,16 +146,17 @@ pipeline {
script {
try {
echo "根据 [${params.Channel}] 渠道获取相关参数"
def playersettings = "$WORKSPACE/Tool/Channels/$CHANNEL_PARAM/ChannelSetting.txt"
sh "chmod +x $WORKSPACE/Tool/build_tools/get_build_version.sh"
sh "chmod +x $WORKSPACE/Tool/build_tools/get_build_upload_path.sh"
sh "chmod +x $WORKSPACE/Tool/build_tools/get_build_assets_end_point.sh"
VERSION_PARAM = sh(script: "$WORKSPACE/Tool/build_tools/get_build_version.sh $playersettings", returnStdout: true).trim()
OSS_UPLOAD_PATH_PARAM = sh(script: "$WORKSPACE/Tool/build_tools/get_build_upload_path.sh $playersettings", returnStdout: true).trim()
ASSETS_END_POINT_PARAM = sh(script: "$WORKSPACE/Tool/build_tools/get_build_assets_end_point.sh $playersettings", returnStdout: true).trim()
BUILD_PATH = "Builds/$CHANNEL_PARAM/$PLATFORM_PARAM/$VERSION_PARAM"
log_path="$BUILD_PATH/build.log"
echo "获取到的版本是 ${VERSION_PARAM}, 获取到的上传地址是 ${OSS_UPLOAD_PATH_PARAM}获取到的assets-oss-endpoint是 ${ASSETS_END_POINT_PARAM}"
def playersettings = "${WORKSPACE}/Tool/Channels/${CHANNEL_PARAM}/ChannelSetting.yaml"
// 1. YAML Groovy Map
def cfg = readYaml(file: playersettings)
// 2. YAML
VERSION_PARAM = (cfg?.Version ?: '').trim()
OSS_UPLOAD_PATH_PARAM = (cfg?.OssRemoteUploadPath ?: '').trim()
ASSETS_END_POINT_PARAM = (cfg?.AssetsEndPoint ?: '').trim()
// 3.
BUILD_PATH = "Builds/$CHANNEL_PARAM/$PLATFORM_PARAM/$VERSION_PARAM"
log_path="$BUILD_PATH/build.log"
echo "获取到的版本是 ${VERSION_PARAM}, 获取到的上传地址是 ${OSS_UPLOAD_PATH_PARAM}获取到的assets-oss-endpoint是 ${ASSETS_END_POINT_PARAM}"
} catch (err) {
def message = "【${PLATFORM_PARAM}】【${VERSION_PARAM}】【Debug】【${CHANNEL_PARAM}】根据渠道获取相关参数失败"
SendMessageToWechat(message)

View File

@ -133,8 +133,8 @@ pipeline {
script {
try {
echo "根据 [${CHANNEL_PARAM}] 渠道修改工程"
sh "chmod +x $WORKSPACE/Tool/build_tools/modify_project_by_channel_yaml.sh"
sh "$WORKSPACE/Tool/build_tools/modify_project_by_channel_yaml.sh $WORKSPACE ${CHANNEL_PARAM}"
sh "chmod +x $WORKSPACE/Tool/build_tools/modify_project_by_channel.sh"
sh "$WORKSPACE/Tool/build_tools/modify_project_by_channel.sh $WORKSPACE ${CHANNEL_PARAM}"
} catch (err) {
def message = "【${PLATFORM_PARAM}】【${VERSION_PARAM}】【Debug】【${CHANNEL_PARAM}】根据渠道修改工程失败"
SendMessageToWechat(message)
@ -169,7 +169,7 @@ pipeline {
}
stage('打包') {
steps {
sh "chmod +x $WORKSPACE/Tool/build_tools/build_unity_yaml.sh"
sh "chmod +x $WORKSPACE/Tool/build_tools/build_unity.sh"
sh "chmod +x $WORKSPACE/Tool/build_tools/hot_update.sh"
script {
@ -182,7 +182,7 @@ pipeline {
log_path="$BUILD_PATH/UpdatePreviousBuild.log"
}
else
build_result=sh(script: "$WORKSPACE/Tool/build_tools/build_unity_yaml.sh ${VERSION_PARAM} ${PLATFORM_PARAM} ${PROFILE_PARAM} ${CHANNEL_PARAM} ${HOTUPDATE_PARAM} ${DEBUGBUILD_PARAM} ${AAB_PARAM} ${DEV_PARAM}", returnStatus: true, returnStdout: false)
build_result=sh(script: "$WORKSPACE/Tool/build_tools/build_unity.sh ${VERSION_PARAM} ${PLATFORM_PARAM} ${PROFILE_PARAM} ${CHANNEL_PARAM} ${HOTUPDATE_PARAM} ${DEBUGBUILD_PARAM} ${AAB_PARAM} ${DEV_PARAM}", returnStatus: true, returnStdout: false)
//
if(build_result != 0)
@ -283,13 +283,7 @@ pipeline {
script {
sh "chmod +x $WORKSPACE/Tool/build_tools/debug_send_version.sh"
def result=0
//result = sh(script: "$WORKSPACE/Tool/build_tools/debug_send_version.sh")
if(result != 0)
{
def message = "【${PLATFORM_PARAM}】【${VERSION_PARAM}】【Debug】【${CHANNEL_PARAM}】发布debug版本号失败"
SendMessageToWechat(message)
error("Failure of the '发布debug版本号' stage")
}
result = sh(script: "$WORKSPACE/Tool/build_tools/debug_send_version.sh")
}
}
}

@ -1 +1 @@
Subproject commit 735437d70777c7757e92e3ec1c76d5852efa1c0b
Subproject commit 14e2f80bfdebc5fe3193b9cbe4a4e96bd4b5dc03