more
This commit is contained in:
Vendored
+14
-90
@@ -1,47 +1,32 @@
|
|||||||
import jetbrains.buildServer.configs.kotlin.*
|
import jetbrains.buildServer.configs.kotlin.*
|
||||||
|
import jetbrains.buildServer.configs.kotlin.buildSteps.powerShell
|
||||||
|
import jetbrains.buildServer.configs.kotlin.buildSteps.script
|
||||||
|
|
||||||
version = "2026.1"
|
version = "2026.1"
|
||||||
|
|
||||||
project {
|
project {
|
||||||
|
|
||||||
description = "Unity CI pipeline with multi-target build fan-out"
|
description = "Unity CI pipeline (Windows + Android + extensible)"
|
||||||
|
|
||||||
// =========================
|
|
||||||
// CORE BUILD (shared logic)
|
|
||||||
// =========================
|
|
||||||
buildType(UnityBuildCore)
|
buildType(UnityBuildCore)
|
||||||
|
|
||||||
// =========================
|
|
||||||
// TRIGGERED BUILDS (fan-out)
|
|
||||||
// =========================
|
|
||||||
buildType(WindowsBuild)
|
buildType(WindowsBuild)
|
||||||
buildType(AndroidBuild)
|
buildType(AndroidBuild)
|
||||||
|
|
||||||
// Future-ready (disabled until you enable them)
|
// Mac/iOS intentionally omitted until you have macOS agents
|
||||||
buildType(MacBuild)
|
|
||||||
buildType(IOSBuild)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* =========================
|
* =========================
|
||||||
* CORE UNITY BUILD PIPELINE
|
* CORE UNITY BUILD PIPELINE
|
||||||
* =========================
|
* =========================
|
||||||
* This is the ONLY build that actually runs Unity.
|
* This is the only build that actually runs Unity.exe
|
||||||
* Everything else just sets parameters and depends on this.
|
|
||||||
*/
|
*/
|
||||||
object UnityBuildCore : BuildType({
|
object UnityBuildCore : BuildType({
|
||||||
|
|
||||||
name = "Unity Build (Core)"
|
name = "Unity Build (Core)"
|
||||||
|
|
||||||
description = "Runs Unity with a selected target"
|
|
||||||
|
|
||||||
params {
|
params {
|
||||||
|
|
||||||
// Default fallback (should never be used in real triggers)
|
|
||||||
param("unity.target", "")
|
param("unity.target", "")
|
||||||
|
|
||||||
// Optional CI metadata
|
|
||||||
param("build.configuration", "Release")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vcs {
|
vcs {
|
||||||
@@ -51,7 +36,8 @@ object UnityBuildCore : BuildType({
|
|||||||
steps {
|
steps {
|
||||||
|
|
||||||
powerShell {
|
powerShell {
|
||||||
name = "Run Unity Build"
|
name = "Build Unity"
|
||||||
|
|
||||||
scriptMode = file {
|
scriptMode = file {
|
||||||
path = "ci/Build-Unity.ps1"
|
path = "ci/Build-Unity.ps1"
|
||||||
}
|
}
|
||||||
@@ -60,13 +46,6 @@ object UnityBuildCore : BuildType({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
features {
|
|
||||||
// Ensures build log is captured cleanly
|
|
||||||
feature {
|
|
||||||
type = "xml-report-plugin"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
artifactRules = """
|
artifactRules = """
|
||||||
Builds/** => builds.zip
|
Builds/** => builds.zip
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
@@ -74,16 +53,13 @@ object UnityBuildCore : BuildType({
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* =========================
|
* =========================
|
||||||
* WINDOWS BUILD ENTRYPOINT
|
* WINDOWS ENTRYPOINT
|
||||||
* =========================
|
* =========================
|
||||||
* Triggered automatically on VCS changes
|
|
||||||
*/
|
*/
|
||||||
object WindowsBuild : BuildType({
|
object WindowsBuild : BuildType({
|
||||||
|
|
||||||
name = "Unity - Windows"
|
name = "Unity - Windows"
|
||||||
|
|
||||||
description = "Build Windows standalone"
|
|
||||||
|
|
||||||
params {
|
params {
|
||||||
param("unity.target", "Windows")
|
param("unity.target", "Windows")
|
||||||
}
|
}
|
||||||
@@ -93,7 +69,7 @@ object WindowsBuild : BuildType({
|
|||||||
}
|
}
|
||||||
|
|
||||||
steps {
|
steps {
|
||||||
// Snapshot dependency ensures correct ordering
|
// no-op (build happens in dependency)
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -109,15 +85,13 @@ object WindowsBuild : BuildType({
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* =========================
|
* =========================
|
||||||
* ANDROID BUILD ENTRYPOINT
|
* ANDROID ENTRYPOINT
|
||||||
* =========================
|
* =========================
|
||||||
*/
|
*/
|
||||||
object AndroidBuild : BuildType({
|
object AndroidBuild : BuildType({
|
||||||
|
|
||||||
name = "Unity - Android"
|
name = "Unity - Android"
|
||||||
|
|
||||||
description = "Build Android AAB/APK"
|
|
||||||
|
|
||||||
params {
|
params {
|
||||||
param("unity.target", "Android")
|
param("unity.target", "Android")
|
||||||
}
|
}
|
||||||
@@ -126,6 +100,10 @@ object AndroidBuild : BuildType({
|
|||||||
root(DslContext.settingsRoot)
|
root(DslContext.settingsRoot)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
steps {
|
||||||
|
// no-op (build happens in dependency)
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
snapshot(UnityBuildCore) {
|
snapshot(UnityBuildCore) {
|
||||||
onDependencyFailure = FailureAction.FAIL_TO_START
|
onDependencyFailure = FailureAction.FAIL_TO_START
|
||||||
@@ -136,57 +114,3 @@ object AndroidBuild : BuildType({
|
|||||||
Builds/Android/** => AndroidBuild.zip
|
Builds/Android/** => AndroidBuild.zip
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
|
||||||
* =========================
|
|
||||||
* MAC BUILD (future ready)
|
|
||||||
* =========================
|
|
||||||
* Requires macOS agent + Xcode
|
|
||||||
*/
|
|
||||||
object MacBuild : BuildType({
|
|
||||||
|
|
||||||
name = "Unity - Mac (Disabled)"
|
|
||||||
|
|
||||||
description = "Future macOS build target"
|
|
||||||
|
|
||||||
params {
|
|
||||||
param("unity.target", "Mac")
|
|
||||||
}
|
|
||||||
|
|
||||||
vcs {
|
|
||||||
root(DslContext.settingsRoot)
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
snapshot(UnityBuildCore) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
enabled = false
|
|
||||||
})
|
|
||||||
|
|
||||||
/**
|
|
||||||
* =========================
|
|
||||||
* iOS BUILD (future ready)
|
|
||||||
* =========================
|
|
||||||
* Requires macOS agent + Xcode + provisioning profiles
|
|
||||||
*/
|
|
||||||
object IOSBuild : BuildType({
|
|
||||||
|
|
||||||
name = "Unity - iOS (Disabled)"
|
|
||||||
|
|
||||||
description = "Future iOS build target"
|
|
||||||
|
|
||||||
params {
|
|
||||||
param("unity.target", "iOS")
|
|
||||||
}
|
|
||||||
|
|
||||||
vcs {
|
|
||||||
root(DslContext.settingsRoot)
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
snapshot(UnityBuildCore) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
enabled = false
|
|
||||||
})
|
|
||||||
Reference in New Issue
Block a user