更新jenkins脚本
parent
c44e1d5694
commit
27de1e035e
|
|
@ -8,6 +8,7 @@ def CHANNEL_PARAM = params.Channel
|
||||||
def DEBUGBUILD_PARAM = params.DebugBuild
|
def DEBUGBUILD_PARAM = params.DebugBuild
|
||||||
def HOTUPDATE_PARAM = params.Enable_Hot_Update
|
def HOTUPDATE_PARAM = params.Enable_Hot_Update
|
||||||
def AAB_PARAM = params.AAB
|
def AAB_PARAM = params.AAB
|
||||||
|
def OBFUZ = params.Obfuz
|
||||||
def DEV_PARAM = true
|
def DEV_PARAM = true
|
||||||
def ANDROIDKEYSTORE = "/Users/mayuanzheng/key/phxh_android.keystore"
|
def ANDROIDKEYSTORE = "/Users/mayuanzheng/key/phxh_android.keystore"
|
||||||
def ANDROIDKEYALIAS = "avery"
|
def ANDROIDKEYALIAS = "avery"
|
||||||
|
|
@ -28,7 +29,10 @@ def GetRemote(){
|
||||||
/*if('GoogleDev' == params.Channel)
|
/*if('GoogleDev' == params.Channel)
|
||||||
return 'firebase';
|
return 'firebase';
|
||||||
else */
|
else */
|
||||||
return 'main';
|
if('Zhanhui' == params.Channel)
|
||||||
|
return 'zhanhui';
|
||||||
|
else
|
||||||
|
return 'main';
|
||||||
}
|
}
|
||||||
|
|
||||||
def SendMessageToWechat(message){
|
def SendMessageToWechat(message){
|
||||||
|
|
@ -281,32 +285,35 @@ pipeline {
|
||||||
stage('上传符号表') {
|
stage('上传符号表') {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
// 增量更新不需要上传符号表
|
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){
|
sh "chmod +x $WORKSPACE/Tool/build_tools/upload_symbol_file.sh"
|
||||||
def playersettings = "${WORKSPACE}/Tool/Channels/${CHANNEL_PARAM}/ChannelSetting.yaml"
|
sh "chmod +x $WORKSPACE/Tool/build_tools/upload_symbol_file_firebase.sh"
|
||||||
def cfg = readYaml(file: playersettings)
|
if (params.Build_InitApp == true){
|
||||||
def symbol_path="$WORKSPACE/Builds/$CHANNEL_PARAM/$PLATFORM_PARAM/$VERSION_PARAM"
|
def playersettings = "${WORKSPACE}/Tool/Channels/${CHANNEL_PARAM}/ChannelSetting.yaml"
|
||||||
def upload_result=0
|
def cfg = readYaml(file: playersettings)
|
||||||
if('GoogleDev' == params.Channel)
|
def symbol_path="$WORKSPACE/Builds/$CHANNEL_PARAM/$PLATFORM_PARAM/$VERSION_PARAM"
|
||||||
{
|
def upload_result=0
|
||||||
def FIREBASE_APP_ID = (cfg?.FIREBASE_APP_ID ?: '').trim()
|
if('GoogleDev' == params.Channel)
|
||||||
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)
|
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