diff --git a/Tool/build_env/jenkins_android_dev.groovy b/Tool/build_env/jenkins_android_dev.groovy index cfd49b6ae9d..37c21ec859b 100644 --- a/Tool/build_env/jenkins_android_dev.groovy +++ b/Tool/build_env/jenkins_android_dev.groovy @@ -273,19 +273,35 @@ pipeline { stage('上传资源') { steps { script { - sh "chmod +x $WORKSPACE/Tool/build_tools/upload_oss.sh" def asset_path="$WORKSPACE/ProjectNLD/ServerData/${PLATFORM_PARAM}" def upload_path="${OSS_UPLOAD_PATH_PARAM}/${CHANNEL_PARAM}/${PLATFORM_PARAM}/${VERSION_PARAM}" - def upload_result=0 - - upload_result = sh(script: "$WORKSPACE/Tool/build_tools/upload_oss.sh ${asset_path} ${upload_path} ${ASSETS_END_POINT_PARAM}", returnStatus: true, returnStdout: false) - - if(upload_result != 0) + + if(params.Upload_Incremental == true) { - def message = "【${PLATFORM_PARAM}】【${VERSION_PARAM}】【Debug】【${CHANNEL_PARAM}】上传资源失败" - SendMessageToWechat(message) - error("Failure of the '上传资源' stage") + def upload_incremental_result=0 + def last_manifest_path="$WORKSPACE/ProjectNLD/ServerData/LastManifests" + sh "chmod +x $WORKSPACE/Tool/build_tools/upload_incremental_oss.sh" + upload_incremental_result = sh(script: "$WORKSPACE/Tool/build_tools/upload_incremental_oss.sh ${asset_path} ${upload_path} ${ASSETS_END_POINT_PARAM} ${last_manifest_path}", returnStatus: true, returnStdout: false) + if(upload_incremental_result != 0) + { + def message = "【${PLATFORM_PARAM}】【${VERSION_PARAM}】【Debug】【${CHANNEL_PARAM}】上传资源失败" + SendMessageToWechat(message) + error("Failure of the '上传资源' stage") + } } + else + { + sh "chmod +x $WORKSPACE/Tool/build_tools/upload_oss.sh" + def upload_result=0 + upload_result = sh(script: "$WORKSPACE/Tool/build_tools/upload_oss.sh ${asset_path} ${upload_path} ${ASSETS_END_POINT_PARAM}", returnStatus: true, returnStdout: false) + if(upload_result != 0) + { + def message = "【${PLATFORM_PARAM}】【${VERSION_PARAM}】【Debug】【${CHANNEL_PARAM}】上传资源失败" + SendMessageToWechat(message) + error("Failure of the '上传资源' stage") + } + } + } } }