完整dev
This commit is contained in:
parent
9fb6d33c92
commit
2c62b501f2
@ -7,8 +7,8 @@
|
||||
// The configuration is done in Jenkins -> Manage Jenkins -> Configure System -> Global Pipeline Libraries
|
||||
@Library("my-shared-lib") _
|
||||
|
||||
Pipeline_release(
|
||||
name: "releaseGame", // the name of the project used to identify in many places *including sky*
|
||||
Pipeline_prod(
|
||||
name: "prodGame", // the name of the project used to identify in many places *including sky*
|
||||
branch: "//Projects/CreativeCrew/baseballbattle/dev", // the code branch to checkout on Perforce
|
||||
branchConfig: "dev", // the current code branch; dev, stable, etc
|
||||
rootDir: "//Projects/CreativeCrew/baseballbattle/dev", // root directory for your code (not a virtual stream)
|
||||
@ -10,7 +10,7 @@ def call(Map config)
|
||||
agent none
|
||||
stages
|
||||
{
|
||||
stage("Build Android")
|
||||
stage("Checkout Unity Project")
|
||||
{
|
||||
agent
|
||||
{
|
||||
@ -18,11 +18,48 @@ def call(Map config)
|
||||
}
|
||||
options
|
||||
{
|
||||
timeout(time: 2, unit: 'HOURS')
|
||||
timeout(time: 1, unit: 'HOURS')
|
||||
}
|
||||
steps
|
||||
{
|
||||
echo 'Test dev 222'
|
||||
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")
|
||||
{
|
||||
agent
|
||||
{
|
||||
label config.winbakeLabel
|
||||
}
|
||||
options
|
||||
{
|
||||
timeout{time: 2, unit: 'HOURS'}
|
||||
}
|
||||
steps
|
||||
{
|
||||
buildBundlesAndroid config
|
||||
}
|
||||
}
|
||||
stage("AchiveArtifact")
|
||||
{
|
||||
agent
|
||||
{
|
||||
label config.winbakeLabel
|
||||
}
|
||||
options
|
||||
{
|
||||
timeout{time: 1, unit: 'HOURS'}
|
||||
}
|
||||
steps
|
||||
{
|
||||
archiveArtifact "Android_dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
17
vars/achiveArtifact.groovy
Normal file
17
vars/achiveArtifact.groovy
Normal file
@ -0,0 +1,17 @@
|
||||
//=================================================================
|
||||
// Byway Studios Inc. Confidential Information.
|
||||
// Copyright Byway Studios Inc. All rights reserved
|
||||
//=================================================================
|
||||
|
||||
def call(publishSubFolder)
|
||||
{
|
||||
// Move artifacts to an Android subdirectory
|
||||
bat """
|
||||
if exist tmpPublish rmdir /S /Q tmpPublish
|
||||
mkdir tmpPublish
|
||||
copy /Y apk\\*.* tmpPublish\\
|
||||
del /F /S /Q apk\\*.*
|
||||
move /Y tmpPublish apk\\${publishSubFolder}
|
||||
"""
|
||||
archiveArtifacts artifacts: 'apk/**/*', fingerprint: true
|
||||
}
|
||||
@ -24,7 +24,7 @@ def call(clearPackageCache,methodName)
|
||||
|
||||
//open unity and execute unity method
|
||||
bat label: "Executing Unity method: ${methodName}", script: """
|
||||
set UNITY_PATH=C:\\Unity\\Editor\\${gUnityVersion_Windows}\\Editor\\Unity.exe
|
||||
set UNITY_PATH=C:\\Program Files\\Unity\\Hub\\Editor\\${gUnityVersion_Windows}\\Editor\\Unity.exe
|
||||
"%UNITY_PATH%" -quit -batchmode -nographics -projectPath "${WORKSPACE}" -executeMethod "${methodName}" -buildTarget Android -stackTraceLogType None -logFile -
|
||||
"""
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user