//================================================================= // Byway Studios Inc. Confidential Information. // Copyright Byway Studios Inc. All rights reserved //================================================================= def call(Map config) { pipeline { agent none options { skipDefaultCheckout(true) // ★ 关键:禁止 Jenkins 自动 checkout library } stages { stage("Checkout Unity Project") { agent { label config.winbakeLabel } options { timeout(30) } steps { checkout([ $class: 'GitSCM', branches: [[name: '*/QA']], // 分支名 userRemoteConfigs: [[ url: 'git@gitea.bywaystudios.com:pet_home/AplusB_Pet_nation.git', credentialsId: '503eaa43-0676-40ac-81c0-d9c5cc8b4ff7' ]] ]) } } stage("Build Unity Android") { agent { label config.winbakeLabel } options { timeout(60) } steps { BuildBundlesAndroid(config) } } stage("AchiveArtifact") { agent { label config.winbakeLabel } options { timeout(10) } steps { archiveArtifact("Android_dev") } } } post { always { dingtalk( robot:'dingtalk_unity_1', type:'MARKDOWN', title:'Build Notice', text: [ "### ${currentBuild.currentResult}", "- Project: ${env.JOB_NAME}", "- BuildNumber: #${env.BUILD_NUMBER}", "- Duration: ${currentBuild.durationString}", "- LogUrl: ${env.BUILD_URL}" ] ) } } } }