更新jenkins脚本
parent
c44e1d5694
commit
27de1e035e
|
|
@ -8,6 +8,7 @@ def CHANNEL_PARAM = params.Channel
|
|||
def DEBUGBUILD_PARAM = params.DebugBuild
|
||||
def HOTUPDATE_PARAM = params.Enable_Hot_Update
|
||||
def AAB_PARAM = params.AAB
|
||||
def OBFUZ = params.Obfuz
|
||||
def DEV_PARAM = true
|
||||
def ANDROIDKEYSTORE = "/Users/mayuanzheng/key/phxh_android.keystore"
|
||||
def ANDROIDKEYALIAS = "avery"
|
||||
|
|
@ -28,7 +29,10 @@ def GetRemote(){
|
|||
/*if('GoogleDev' == params.Channel)
|
||||
return 'firebase';
|
||||
else */
|
||||
return 'main';
|
||||
if('Zhanhui' == params.Channel)
|
||||
return 'zhanhui';
|
||||
else
|
||||
return 'main';
|
||||
}
|
||||
|
||||
def SendMessageToWechat(message){
|
||||
|
|
@ -281,32 +285,35 @@ pipeline {
|
|||
stage('上传符号表') {
|
||||
steps {
|
||||
script {
|
||||
// 增量更新不需要上传符号表
|
||||
sh "chmod +x $WORKSPACE/Tool/build_tools/upload_symbol_file.sh"
|
||||
sh "chmod +x $WORKSPACE/Tool/build_tools/upload_symbol_file_firebase.sh"
|
||||
if (params.Build_InitApp == true){
|
||||
def playersettings = "${WORKSPACE}/Tool/Channels/${CHANNEL_PARAM}/ChannelSetting.yaml"
|
||||
def cfg = readYaml(file: playersettings)
|
||||
def symbol_path="$WORKSPACE/Builds/$CHANNEL_PARAM/$PLATFORM_PARAM/$VERSION_PARAM"
|
||||
def upload_result=0
|
||||
if('GoogleDev' == params.Channel)
|
||||
{
|
||||
def FIREBASE_APP_ID = (cfg?.FIREBASE_APP_ID ?: '').trim()
|
||||
echo "获取到的Firebase App ID ${FIREBASE_APP_ID}"
|
||||
upload_result = sh(script: "$WORKSPACE/Tool/build_tools/upload_symbol_file_firebase.sh ${VERSION_PARAM} ${symbol_path} ${FIREBASE_APP_ID}", returnStatus: true, returnStdout: false)
|
||||
if(params.UploadSymbol == true)
|
||||
{
|
||||
// 增量更新不需要上传符号表
|
||||
sh "chmod +x $WORKSPACE/Tool/build_tools/upload_symbol_file.sh"
|
||||
sh "chmod +x $WORKSPACE/Tool/build_tools/upload_symbol_file_firebase.sh"
|
||||
if (params.Build_InitApp == true){
|
||||
def playersettings = "${WORKSPACE}/Tool/Channels/${CHANNEL_PARAM}/ChannelSetting.yaml"
|
||||
def cfg = readYaml(file: playersettings)
|
||||
def symbol_path="$WORKSPACE/Builds/$CHANNEL_PARAM/$PLATFORM_PARAM/$VERSION_PARAM"
|
||||
def upload_result=0
|
||||
if('GoogleDev' == params.Channel)
|
||||
{
|
||||
def FIREBASE_APP_ID = (cfg?.FIREBASE_APP_ID ?: '').trim()
|
||||
echo "获取到的Firebase App ID ${FIREBASE_APP_ID}"
|
||||
upload_result = sh(script: "$WORKSPACE/Tool/build_tools/upload_symbol_file_firebase.sh ${VERSION_PARAM} ${symbol_path} ${FIREBASE_APP_ID}", returnStatus: true, returnStdout: false)
|
||||
}
|
||||
else
|
||||
{
|
||||
def crashsightConfig = cfg?."CrashSight_${PLATFORM_PARAM}"
|
||||
def crashsightId = (crashsightConfig?.id ?: '').trim()
|
||||
def crashsightKey = (crashsightConfig?.key ?: '').trim()
|
||||
upload_result = sh(script: "$WORKSPACE/Tool/build_tools/upload_symbol_file.sh ${VERSION_PARAM} ${PLATFORM_PARAM} ${symbol_path} ${crashsightId} ${crashsightKey}", returnStatus: true, returnStdout: false)
|
||||
}
|
||||
if(upload_result != 0)
|
||||
{
|
||||
def message = "【${PLATFORM_PARAM}】【${VERSION_PARAM}】【Debug】【${CHANNEL_PARAM}】上传符号表异常"
|
||||
SendMessageToWechat(message)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
def crashsightConfig = cfg?."CrashSight_${PLATFORM_PARAM}"
|
||||
def crashsightId = (crashsightConfig?.id ?: '').trim()
|
||||
def crashsightKey = (crashsightConfig?.key ?: '').trim()
|
||||
upload_result = sh(script: "$WORKSPACE/Tool/build_tools/upload_symbol_file.sh ${VERSION_PARAM} ${PLATFORM_PARAM} ${symbol_path} ${crashsightId} ${crashsightKey}", returnStatus: true, returnStdout: false)
|
||||
}
|
||||
if(upload_result != 0)
|
||||
{
|
||||
def message = "【${PLATFORM_PARAM}】【${VERSION_PARAM}】【Debug】【${CHANNEL_PARAM}】上传符号表异常"
|
||||
SendMessageToWechat(message)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue