Skip to content

Commit b6ab3cc

Browse files
committed
Removed Debug and Release builds from TC.
1 parent cec6ed0 commit b6ab3cc

File tree

3 files changed

+14
-175
lines changed

3 files changed

+14
-175
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ global.json
1616
*.g.json
1717
*.g.ps1
1818
scripts/build-agents/last-execution.txt
19-
*.log
19+
*.log
20+
copilot.data.*

.teamcity/settings.kts

Lines changed: 7 additions & 172 deletions
Original file line numberDiff line numberDiff line change
@@ -11,179 +11,14 @@ version = "2025.07"
1111

1212
project {
1313

14-
buildType(DebugBuild)
15-
buildType(ReleaseBuild)
1614
buildType(PublicBuild)
1715
buildType(PublicDeployment)
1816
buildType(VersionBump)
1917

20-
buildTypesOrder = arrayListOf(DebugBuild,ReleaseBuild,PublicBuild,PublicDeployment,VersionBump)
18+
buildTypesOrder = arrayListOf(PublicBuild,PublicDeployment,VersionBump)
2119

2220
}
2321

24-
object DebugBuild : BuildType({
25-
26-
name = "Build [Debug]"
27-
28-
artifactRules = """+:artifacts/publish/public/**/*=>artifacts/publish/public
29-
+:artifacts/publish/private/**/*=>artifacts/publish/private
30-
+:artifacts/testResults/**/*=>artifacts/testResults
31-
+:artifacts/logs/**/*=>logs
32-
+:artifacts/dumps/**/*=>dumps
33-
"""
34-
35-
params {
36-
text("Build.Arguments", "", label = "DockerBuild.ps1 Arguments", description = "Arguments to append to the 'Build' build step.", allowEmpty = true)
37-
param("Build.Timeout", "30")
38-
}
39-
40-
vcs {
41-
root(AbsoluteId("Engineering_PostSharpEngineering"))
42-
checkoutMode = CheckoutMode.ON_AGENT
43-
}
44-
45-
steps {
46-
powerShell {
47-
name = "Prepare Docker image postsharpengineering-2023.2"
48-
id = "PrepareImage"
49-
scriptMode = file {
50-
path = "DockerBuild.ps1"
51-
}
52-
noProfile = false
53-
scriptArgs = "-BuildImage -ImageName postsharpengineering-2023.2"
54-
}
55-
powerShell {
56-
name = "Build"
57-
id = "Build"
58-
scriptMode = file {
59-
path = "DockerBuild.ps1"
60-
}
61-
noProfile = false
62-
scriptArgs = "-Script Build.ps1 -ImageName postsharpengineering-2023.2 -NoBuildImage test --configuration Debug --buildNumber %build.number% --buildType %system.teamcity.buildType.id% %Build.Arguments% --timeout %Build.Timeout%"
63-
}
64-
}
65-
66-
requirements {
67-
equals("env.BuildAgentType", "docker-win-x64-md")
68-
}
69-
70-
features {
71-
swabra {
72-
lockingProcesses = Swabra.LockingProcessPolicy.KILL
73-
verbose = true
74-
}
75-
commitStatusPublisher {
76-
vcsRootExtId = "Engineering_PostSharpEngineering"
77-
publisher = github {
78-
githubUrl = "https://api.github.com"
79-
authType = personalToken {
80-
token = "%env.GITHUB_TOKEN%"
81-
}
82-
}
83-
}
84-
pullRequests {
85-
vcsRootExtId = "Engineering_PostSharpEngineering"
86-
provider = github {
87-
authType = token {
88-
token = "%env.GITHUB_TOKEN%"
89-
}
90-
filterTargetBranch = "+:refs/heads/develop/2023.2"
91-
filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY
92-
}
93-
}
94-
95-
96-
}
97-
98-
triggers {
99-
vcs {
100-
watchChangesInDependencies = true
101-
branchFilter = "+:develop/2023.2"
102-
quietPeriodMode = VcsTrigger.QuietPeriodMode.USE_CUSTOM
103-
quietPeriod = 7200
104-
// Build will not trigger automatically if the commit message contains comment value.
105-
triggerRules = "-:comment=<<VERSION_BUMP>>|<<DEPENDENCIES_UPDATED>>:**"
106-
}
107-
}
108-
109-
})
110-
111-
object ReleaseBuild : BuildType({
112-
113-
name = "Build [Release]"
114-
115-
artifactRules = """+:artifacts/publish/public/**/*=>artifacts/publish/public
116-
+:artifacts/publish/private/**/*=>artifacts/publish/private
117-
+:artifacts/testResults/**/*=>artifacts/testResults
118-
+:artifacts/logs/**/*=>logs
119-
+:artifacts/dumps/**/*=>dumps
120-
"""
121-
122-
params {
123-
text("Build.Arguments", "", label = "DockerBuild.ps1 Arguments", description = "Arguments to append to the 'Build' build step.", allowEmpty = true)
124-
param("Build.Timeout", "30")
125-
}
126-
127-
vcs {
128-
root(AbsoluteId("Engineering_PostSharpEngineering"))
129-
checkoutMode = CheckoutMode.ON_AGENT
130-
}
131-
132-
steps {
133-
powerShell {
134-
name = "Prepare Docker image postsharpengineering-2023.2"
135-
id = "PrepareImage"
136-
scriptMode = file {
137-
path = "DockerBuild.ps1"
138-
}
139-
noProfile = false
140-
scriptArgs = "-BuildImage -ImageName postsharpengineering-2023.2"
141-
}
142-
powerShell {
143-
name = "Build"
144-
id = "Build"
145-
scriptMode = file {
146-
path = "DockerBuild.ps1"
147-
}
148-
noProfile = false
149-
scriptArgs = "-Script Build.ps1 -ImageName postsharpengineering-2023.2 -NoBuildImage test --configuration Release --buildNumber %build.number% --buildType %system.teamcity.buildType.id% %Build.Arguments% --timeout %Build.Timeout%"
150-
}
151-
}
152-
153-
requirements {
154-
equals("env.BuildAgentType", "docker-win-x64-md")
155-
}
156-
157-
features {
158-
swabra {
159-
lockingProcesses = Swabra.LockingProcessPolicy.KILL
160-
verbose = true
161-
}
162-
commitStatusPublisher {
163-
vcsRootExtId = "Engineering_PostSharpEngineering"
164-
publisher = github {
165-
githubUrl = "https://api.github.com"
166-
authType = personalToken {
167-
token = "%env.GITHUB_TOKEN%"
168-
}
169-
}
170-
}
171-
pullRequests {
172-
vcsRootExtId = "Engineering_PostSharpEngineering"
173-
provider = github {
174-
authType = token {
175-
token = "%env.GITHUB_TOKEN%"
176-
}
177-
filterTargetBranch = "+:refs/heads/develop/2023.2"
178-
filterAuthorRole = PullRequests.GitHubRoleFilter.EVERYBODY
179-
}
180-
}
181-
182-
183-
}
184-
185-
})
186-
18722
object PublicBuild : BuildType({
18823

18924
name = "Build [Public]"
@@ -213,7 +48,7 @@ object PublicBuild : BuildType({
21348
path = "DockerBuild.ps1"
21449
}
21550
noProfile = false
216-
scriptArgs = "-BuildImage -ImageName postsharpengineering-2023.2"
51+
scriptArgs = "-BuildImage -ImageName postsharpengineering-2023.2 "
21752
}
21853
powerShell {
21954
name = "Build"
@@ -222,7 +57,7 @@ object PublicBuild : BuildType({
22257
path = "DockerBuild.ps1"
22358
}
22459
noProfile = false
225-
scriptArgs = "-Script Build.ps1 -ImageName postsharpengineering-2023.2 -NoBuildImage test --configuration Public --buildNumber %build.number% --buildType %system.teamcity.buildType.id% %Build.Arguments% --timeout %Build.Timeout%"
60+
scriptArgs = "-Script Build.ps1 -ImageName postsharpengineering-2023.2 -NoBuildImage test --configuration Public --buildNumber %build.number% --buildType %system.teamcity.buildType.id% --timeout %Build.Timeout% %Build.Arguments%"
22661
}
22762
}
22863

@@ -284,7 +119,7 @@ object PublicDeployment : BuildType({
284119
path = "DockerBuild.ps1"
285120
}
286121
noProfile = false
287-
scriptArgs = "-BuildImage -ImageName postsharpengineering-2023.2"
122+
scriptArgs = "-BuildImage -ImageName postsharpengineering-2023.2 "
288123
}
289124
powerShell {
290125
name = "Publish"
@@ -293,7 +128,7 @@ object PublicDeployment : BuildType({
293128
path = "DockerBuild.ps1"
294129
}
295130
noProfile = false
296-
scriptArgs = "-Script Build.ps1 -ImageName postsharpengineering-2023.2 -NoBuildImage publish --configuration Public %Publish.Arguments% --timeout %Publish.Timeout%"
131+
scriptArgs = "-Script Build.ps1 -ImageName postsharpengineering-2023.2 -NoBuildImage publish --configuration Public --timeout %Publish.Timeout% %Publish.Arguments%"
297132
}
298133
}
299134

@@ -345,7 +180,7 @@ object VersionBump : BuildType({
345180
path = "DockerBuild.ps1"
346181
}
347182
noProfile = false
348-
scriptArgs = "-BuildImage -ImageName postsharpengineering-2023.2"
183+
scriptArgs = "-BuildImage -ImageName postsharpengineering-2023.2 "
349184
}
350185
powerShell {
351186
name = "Bump"
@@ -354,7 +189,7 @@ object VersionBump : BuildType({
354189
path = "DockerBuild.ps1"
355190
}
356191
noProfile = false
357-
scriptArgs = "-Script Build.ps1 -ImageName postsharpengineering-2023.2 -NoBuildImage bump %Bump.Arguments% --timeout %Bump.Timeout%"
192+
scriptArgs = "-Script Build.ps1 -ImageName postsharpengineering-2023.2 -NoBuildImage bump --timeout %Bump.Timeout% %Bump.Arguments%"
358193
}
359194
}
360195

eng/src/Program.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Copyright (c) SharpCrafters s.r.o. See the LICENSE.md file in the root directory of this repository root for details.
22

33
using PostSharp.Engineering.BuildTools;
4+
using PostSharp.Engineering.BuildTools.Build;
45
using PostSharp.Engineering.BuildTools.Build.Model;
56
using PostSharp.Engineering.BuildTools.Build.Solutions;
67
using PostSharp.Engineering.BuildTools.Dependencies.Definitions;
78
using PostSharp.Engineering.BuildTools.Docker;
8-
using Spectre.Console.Cli;
99

1010
const string sdkVersion = "9.0.305";
1111
var product = new Product( DevelopmentDependencies.PostSharpEngineering )
@@ -14,12 +14,15 @@
1414
DotNetSdkVersion = new DotNetSdkVersion( sdkVersion ),
1515
OverriddenBuildAgentRequirements = new ContainerRequirements( ContainerHostKind.Windows )
1616
{
17-
Components = [ new DotNetComponent( sdkVersion, DotNetComponentKind.Sdk )]
17+
Components = [new DotNetComponent( sdkVersion, DotNetComponentKind.Sdk )]
1818
},
1919
Solutions =
2020
[
2121
new DotNetSolution( "PostSharp.Engineering.sln" ) { SupportsTestCoverage = true, CanFormatCode = true }
2222
],
23+
Configurations = Product.DefaultConfigurations
24+
.WithValue( BuildConfiguration.Debug, c => c with { ExportsToTeamCityBuild = false } )
25+
.WithValue( BuildConfiguration.Release, c => c with { ExportsToTeamCityBuild = false } ),
2326
PublicArtifacts = Pattern.Create(
2427
"PostSharp.Engineering.Sdk.$(PackageVersion).nupkg",
2528
"PostSharp.Engineering.BuildTools.$(PackageVersion).nupkg",

0 commit comments

Comments
 (0)