80 lines
2.2 KiB
Groovy
80 lines
2.2 KiB
Groovy
//=================================================================
|
|
// Byway Studios Inc. Confidential Information.
|
|
// Copyright Byway Studios Inc. All rights reserved
|
|
//=================================================================
|
|
|
|
def call(Map config)
|
|
{
|
|
pipeline
|
|
{
|
|
agent
|
|
{
|
|
label config.winbakeLabel
|
|
}
|
|
options
|
|
{
|
|
skipDefaultCheckout(true) // ★ 关键:禁止 Jenkins 自动 checkout library
|
|
}
|
|
stages
|
|
{
|
|
stage("Checkout Unity Project")
|
|
{
|
|
options
|
|
{
|
|
timeout(30)
|
|
}
|
|
steps
|
|
{
|
|
checkout([
|
|
$class: 'GitSCM',
|
|
branches: [[name: '*/main']], // 分支名
|
|
userRemoteConfigs: [[
|
|
url: 'git@gitea.bywaystudios.com:pet_home/AplusB_Pet_nation.git',
|
|
credentialsId: '503eaa43-0676-40ac-81c0-d9c5cc8b4ff7'
|
|
]]
|
|
])
|
|
}
|
|
}
|
|
stage("Build Unity Android")
|
|
{
|
|
options
|
|
{
|
|
timeout(60)
|
|
}
|
|
steps
|
|
{
|
|
BuildBundlesAndroid(config)
|
|
}
|
|
}
|
|
stage("AchiveArtifact")
|
|
{
|
|
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}"
|
|
]
|
|
)
|
|
}
|
|
}
|
|
}
|
|
} |