Skip to content

Commit 22ef16c

Browse files
committed
Update TC configuration changes from carbon-template
1 parent 9437f41 commit 22ef16c

4 files changed

Lines changed: 29 additions & 49 deletions

File tree

‎.teamcity/MacOS/Project.kt‎

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Copyright © 2026 CCP ehf.
2-
31
package MacOS
42

53
import jetbrains.buildServer.configs.kotlin.DslContext
@@ -53,7 +51,7 @@ class CarbonBuildMacOS(buildName: String, configType: String, preset: String, ag
5351
id(buildName.toId())
5452
name = buildName
5553

56-
artifactRules = "%env.CMAKE_INSTALL_PREFIX%"
54+
artifactRules = "%env.CMAKE_INSTALL_PREFIX% => artifact.zip"
5755

5856
params {
5957
param("env.SENTRY_CLI_DEBUG_SYMBOL_TYPE", "dsym")
@@ -154,13 +152,7 @@ class CarbonBuildMacOS(buildName: String, configType: String, preset: String, ag
154152
authType = token {
155153
token = "%GITHUB_CARBON_PAT%"
156154
}
157-
// Constrain PR triggers to compatible refs so as to avoid erroneous triggers
158-
filterTargetBranch = """
159-
+:refs/heads/main
160-
+:refs/heads/release/*.x
161-
-:refs/heads/release/1.x
162-
""".trimIndent()
163-
filterAuthorRole = PullRequests.GitHubRoleFilter.MEMBER
155+
filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY
164156
}
165157
}
166158
commitStatusPublisher {
@@ -196,4 +188,3 @@ class CarbonBuildMacOS(buildName: String, configType: String, preset: String, ag
196188
}
197189
})
198190

199-

‎.teamcity/Windows/Project.kt‎

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Copyright © 2026 CCP ehf.
2-
31
package Windows
42

53
import jetbrains.buildServer.configs.kotlin.DslContext
@@ -42,14 +40,15 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
4240
id(buildName.toId())
4341
this.name = buildName
4442

45-
artifactRules = "%env.CMAKE_INSTALL_PREFIX%"
43+
artifactRules = "%env.CMAKE_INSTALL_PREFIX% => artifact.zip"
4644

4745
params {
4846
param("env.GIT_TAG_HASH_OVERRIDE", "")
4947
param("github_checkout_folder", "github")
5048
param("env.CTEST_JUNIT_OUTPUT_FILE", "ctest_results.xml")
5149
select("env.VISUAL_STUDIO_PLATFORM_TOOLSET", "v141", label = "Visual Studio Platform Toolset", description = "Specify the toolset for the build. e.g. v141 or v143.",
5250
options = listOf("v141 (2017)" to "v141", "v143 (2022)" to "v143"))
51+
param("VS_DEV_BAT_SWITCHES", "-arch=x64")
5352
param("env.CMAKE_BUILD_TARGETS", "all")
5453
param("env.CMAKE_INSTALL_PREFIX", ".build-artifact")
5554
param("env.CMAKE_CONFIG_TYPE", configType)
@@ -91,7 +90,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
9190
scriptContent = """
9291
REM unfortunately ninja does not find the VS environment otherwise
9392
REM NB: the exported PATH also contains the location where we installed sentry-cli, e.g. teamcity.agent.work.dir
94-
call "%env.VSDEV_BAT_PATH%" -arch=x64
93+
call "%env.VSDEV_BAT_PATH%" %VS_DEV_BAT_SWITCHES%
9594
echo ##teamcity[setParameter name='env.INCLUDE' value='%%INCLUDE%%']
9695
echo ##teamcity[setParameter name='env.LIB' value='%%LIB%%']
9796
echo ##teamcity[setParameter name='env.LIBPATH' value='%%LIBPATH%%']
@@ -140,7 +139,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
140139
echo ${'$'}Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList ${'$'}User, ${'$'}Password
141140
echo New-PSDrive -Name "symbols" -PSProvider FileSystem -Root ${'$'}Env:TC_SYMBOL_STORE_PATH -Credential ${'$'}Credential
142141
echo Write-Host "##teamcity[progressMessage 'Storing symbols']"
143-
echo ${'$'}symstoreFlags = ^@^("add","/compress","/t", "CCP Games", "/c", "TeamCity %build.number%", "/s", "${'$'}Env:TC_SYMBOL_STORE_PATH", "/o", "/r", "/f", "%env.CMAKE_BUILD_FOLDER%"^)
142+
echo ${'$'}symstoreFlags = ^@^("add","/compress","/t", "CCP Games", "/c", "TeamCity %build.number%", "/s", "${'$'}Env:TC_SYMBOL_STORE_PATH", "/o", "/r", "/f", "%env.CMAKE_BUILD_FOLDER%"^)
144143
echo ^& ${'$'}Env:TC_SYMSTORE_PATH ${'$'}symstoreFlags ^| Tee-Object -file symstore.txt
145144
echo ${'$'}stored = get-content symstore.txt ^| Select-String "^SYMSTORE: Number of files stored = (.*)${'$'}"
146145
echo ${'$'}stored = ${'$'}stored.Matches.Groups[1].Value
@@ -166,7 +165,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
166165
${'$'}Password = ConvertTo-SecureString -String "%DOMAIN_USER_PASSWORD%" -AsPlainText -Force
167166
${'$'}Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList ${'$'}User, ${'$'}Password
168167
New-PSDrive -Name "symbols" -PSProvider FileSystem -Root ${'$'}Env:TC_SYMBOL_STORE_PATH -Credential ${'$'}Credential
169-
168+
170169
Write-Host "##teamcity[progressMessage 'Storing symbols']"
171170
${'$'}symstoreFlags = @("add",
172171
"/compress",
@@ -177,16 +176,16 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
177176
"/r", # Recursive
178177
"/f", "%env.CMAKE_BUILD_FOLDER%") # source folder
179178
& ${'$'}Env:TC_SYMSTORE_PATH ${'$'}symstoreFlags | Tee-Object -file symstore.txt
180-
179+
181180
${'$'}stored = get-content symstore.txt | Select-String "^SYMSTORE: Number of files stored = (.*)${'$'}"
182181
${'$'}stored = ${'$'}stored.Matches.Groups[1].Value
183-
182+
184183
${'$'}errors = get-content symstore.txt | Select-String "^SYMSTORE: Number of errors = (.*)${'$'}"
185184
${'$'}errors = ${'$'}errors.Matches.Groups[1].Value
186-
185+
187186
${'$'}ignored = get-content symstore.txt | Select-String "^SYMSTORE: Number of files ignored = (.*)${'$'}"
188187
${'$'}ignored = ${'$'}ignored.Matches.Groups[1].Value
189-
188+
190189
Write-Host "##teamcity[buildStatus text='Stored: ${'$'}stored, Errors: ${'$'}errors, Ignored: ${'$'}ignored']"
191190
""".trimIndent()
192191
}
@@ -210,13 +209,7 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
210209
authType = token {
211210
token = "%GITHUB_CARBON_PAT%"
212211
}
213-
// Constrain PR triggers to compatible refs so as to avoid erroneous triggers
214-
filterTargetBranch = """
215-
+:refs/heads/main
216-
+:refs/heads/release/*.x
217-
-:refs/heads/release/1.x
218-
""".trimIndent()
219-
filterAuthorRole = PullRequests.GitHubRoleFilter.MEMBER
212+
filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY
220213
}
221214
}
222215
commitStatusPublisher {
@@ -249,4 +242,4 @@ class CarbonBuildWindows(buildName: String, configType: String, preset: String)
249242
requirements {
250243
startsWith("teamcity.agent.jvm.os.name", "Windows Server")
251244
}
252-
})
245+
})

‎.teamcity/_Self.kt/buildTypes/CreateUniversalBuilds.kt‎

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Copyright © 2026 CCP ehf.
2-
31
package _Self.buildTypes
42

53
import jetbrains.buildServer.configs.kotlin.*
@@ -13,7 +11,7 @@ class UniversalBuild() : BuildType({
1311
name = "Create MacOS Universal Binaries"
1412

1513
params{
16-
param("carbon-pipeline-tools-ref", "refs/heads/main")
14+
param("carbon-pipeline-tools-ref", "refs/tags/v0.1.0")
1715
param("universal-output-dir", "%system.teamcity.build.workingDir%/output_build")
1816
param("universal-lib-path", "lib/macOS/universal/AppleClang/")
1917
param("universal-bin-path", "bin/macOS/universal/AppleClang/")
@@ -32,7 +30,7 @@ class UniversalBuild() : BuildType({
3230
)
3331
}
3432

35-
artifactRules = "%universal-output-dir%"
33+
artifactRules = "%universal-output-dir% => artifact.zip"
3634

3735
vcs {
3836
root(AbsoluteId("CarbonPipelineTools"), "+:carbon/.=>carbon")
@@ -88,7 +86,7 @@ class UniversalBuild() : BuildType({
8886
}
8987

9088
artifacts {
91-
artifactRules = "**/*=>%system.teamcity.build.workingDir%/arm64"
89+
artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/arm64"
9290
}
9391
}
9492
dependency(MacOS.x64_Debug) {
@@ -97,7 +95,7 @@ class UniversalBuild() : BuildType({
9795
}
9896

9997
artifacts {
100-
artifactRules = "**/*=>%system.teamcity.build.workingDir%/x64"
98+
artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/x64"
10199
}
102100
}
103101

@@ -107,7 +105,7 @@ class UniversalBuild() : BuildType({
107105
}
108106

109107
artifacts {
110-
artifactRules = "**/*=>%system.teamcity.build.workingDir%/arm64"
108+
artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/arm64"
111109
}
112110
}
113111
dependency(MacOS.x64_Release) {
@@ -116,7 +114,7 @@ class UniversalBuild() : BuildType({
116114
}
117115

118116
artifacts {
119-
artifactRules = "**/*=>%system.teamcity.build.workingDir%/x64"
117+
artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/x64"
120118
}
121119
}
122120

@@ -126,7 +124,7 @@ class UniversalBuild() : BuildType({
126124
}
127125

128126
artifacts {
129-
artifactRules = "**/*=>%system.teamcity.build.workingDir%/arm64"
127+
artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/arm64"
130128
}
131129
}
132130
dependency(MacOS.x64_Internal) {
@@ -135,7 +133,7 @@ class UniversalBuild() : BuildType({
135133
}
136134

137135
artifacts {
138-
artifactRules = "**/*=>%system.teamcity.build.workingDir%/x64"
136+
artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/x64"
139137
}
140138
}
141139

@@ -145,7 +143,7 @@ class UniversalBuild() : BuildType({
145143
}
146144

147145
artifacts {
148-
artifactRules = "**/*=>%system.teamcity.build.workingDir%/arm64"
146+
artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/arm64"
149147
}
150148
}
151149
dependency(MacOS.x64_TrinityDev) {
@@ -154,7 +152,7 @@ class UniversalBuild() : BuildType({
154152
}
155153

156154
artifacts {
157-
artifactRules = "**/*=>%system.teamcity.build.workingDir%/x64"
155+
artifactRules = "artifact.zip!**=>%system.teamcity.build.workingDir%/x64"
158156
}
159157
}
160158
}

‎.teamcity/_Self.kt/buildTypes/PublishToPerforce.kt‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Copyright © 2026 CCP ehf.
2-
31
package _Self.buildTypes
42

53
import jetbrains.buildServer.configs.kotlin.*
@@ -33,7 +31,7 @@ class Publish(perforce_publish_path: String) : BuildType({
3331
param("env.P4PORT", "p4is.ccp.ad.local:1666")
3432
param("env.TC_EVE_BRANCH_SHORTNAME", "%eve_branch_shortname%")
3533
param("env.TC_EVE_PROJECT", "%project%")
36-
param("carbon-pipeline-tools-ref", "refs/heads/main")
34+
param("carbon-pipeline-tools-ref", "refs/tags/v0.1.0")
3735
select("eve_branch_path", "//%project%/%eve_branch_shortname%/", label = "Perforce branch", description = "Is this a regular perforce branch or a perforce stream? Used for setting the proper branch path.", display = ParameterDisplay.PROMPT,
3836
options = listOf("Regular" to "//%project%/branches/%eve_branch_type%/%eve_branch_shortname%/", "Frontier Stream" to "//%project%/%eve_branch_shortname%/"))
3937
select("eve_branch_type", "sandbox", label = "Branch type", description = "The type of branch to publish into", display = ParameterDisplay.PROMPT,
@@ -210,7 +208,7 @@ class Publish(perforce_publish_path: String) : BuildType({
210208
}
211209

212210
artifacts {
213-
artifactRules = "**/*=>%perforce_path_to_publish_into%/${MacOS.arm64_Release.depParamRefs["env.GIT_TAG_HASH"]}"
211+
artifactRules = "artifact.zip!**=>%perforce_path_to_publish_into%/${MacOS.arm64_Release.depParamRefs["env.GIT_TAG_HASH"]}"
214212
}
215213
}
216214
dependency(Windows.Debug) {
@@ -219,7 +217,7 @@ class Publish(perforce_publish_path: String) : BuildType({
219217
}
220218

221219
artifacts {
222-
artifactRules = "**/*=>%perforce_path_to_publish_into%/${Windows.Debug.depParamRefs["env.GIT_TAG_HASH"]}"
220+
artifactRules = "artifact.zip!**=>%perforce_path_to_publish_into%/${Windows.Debug.depParamRefs["env.GIT_TAG_HASH"]}"
223221
}
224222
}
225223
dependency(Windows.Internal) {
@@ -228,7 +226,7 @@ class Publish(perforce_publish_path: String) : BuildType({
228226
}
229227

230228
artifacts {
231-
artifactRules = "**/*=>%perforce_path_to_publish_into%/${Windows.Internal.depParamRefs["env.GIT_TAG_HASH"]}"
229+
artifactRules = "artifact.zip!**=>%perforce_path_to_publish_into%/${Windows.Internal.depParamRefs["env.GIT_TAG_HASH"]}"
232230
}
233231
}
234232
dependency(Windows.Release) {
@@ -237,7 +235,7 @@ class Publish(perforce_publish_path: String) : BuildType({
237235
}
238236

239237
artifacts {
240-
artifactRules = "**/*=>%perforce_path_to_publish_into%/${Windows.Release.depParamRefs["env.GIT_TAG_HASH"]}"
238+
artifactRules = "artifact.zip!**=>%perforce_path_to_publish_into%/${Windows.Release.depParamRefs["env.GIT_TAG_HASH"]}"
241239
}
242240
}
243241
dependency(Windows.TrinityDev) {
@@ -246,7 +244,7 @@ class Publish(perforce_publish_path: String) : BuildType({
246244
}
247245

248246
artifacts {
249-
artifactRules = "**/*=>%perforce_path_to_publish_into%/${Windows.TrinityDev.depParamRefs["env.GIT_TAG_HASH"]}"
247+
artifactRules = "artifact.zip!**=>%perforce_path_to_publish_into%/${Windows.TrinityDev.depParamRefs["env.GIT_TAG_HASH"]}"
250248
}
251249
}
252250
artifacts(AbsoluteId("Infrastructure_MetaTeamCity_Tools_TeamcityChanges")) {

0 commit comments

Comments
 (0)