Skip to content

Commit 2d6110e

Browse files
authored
[release/10.0.1xx-preview6] Simplify our container usage (#49553)
2 parents c1a13a0 + af48adc commit 2d6110e

File tree

8 files changed

+40
-90
lines changed

8 files changed

+40
-90
lines changed

.vsts-ci.yml

Lines changed: 18 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,9 @@ extends:
6464
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
6565
parameters:
6666
containers:
67-
alpine322Amd64:
68-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.22-amd64
69-
centosStream9:
70-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
71-
debian12Amd64:
72-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc15-amd64
73-
fedora39:
74-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39
75-
mariner20CrossArm:
76-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm
67+
azureLinux30Net10BuildAmd64:
68+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64
69+
7770
sdl:
7871
sourceAnalysisPool:
7972
name: $(DncEngInternalBuildPool)
@@ -162,60 +155,44 @@ extends:
162155
timeoutInMinutes: 90
163156
linuxJobParameterSets:
164157
### OFFICIAL ###
165-
# Note: These builds are also portable like the Portable category, but that category uses containers, and doesn't publish zips and tarballs.
158+
# Note: These builds are also glibc like the glibc category, but that category uses containers, and doesn't publish zips and tarballs.
166159
- categoryName: Official
167160
publishArgument: $(_publishArgument)
168161
officialBuildProperties: $(_officialBuildProperties)
169-
osProperties: $(linuxOsPortableProperties)
162+
osProperties: $(linuxOsglibcProperties)
170163
runTests: false
171164
- categoryName: Official
172165
targetArchitecture: arm
173166
runtimeIdentifier: linux-arm
174167
publishArgument: $(_publishArgument)
175168
officialBuildProperties: $(_officialBuildProperties)
176-
osProperties: $(linuxOsPortableProperties)
169+
osProperties: $(linuxOsglibcProperties)
177170
runTests: false
178171
- categoryName: Official
179172
targetArchitecture: arm64
180173
runtimeIdentifier: linux-arm64
181174
publishArgument: $(_publishArgument)
182175
officialBuildProperties: $(_officialBuildProperties)
183-
osProperties: $(linuxOsPortableProperties)
184-
runTests: false
185-
### PORTABLE ###
186-
- categoryName: Portable
187-
# Do not publish zips and tarballs. The linux-x64 binaries are already published by Official.
188-
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
189-
officialBuildProperties: $(_officialBuildProperties)
190-
osProperties: $(linuxOsPortableProperties) /p:BuildSdkDeb=true
191-
runTests: false
192-
- categoryName: Portable
193-
targetArchitecture: arm64
194-
runtimeIdentifier: linux-arm64
195-
# Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official.
196-
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
197-
officialBuildProperties: $(_officialBuildProperties)
198-
osProperties: $(linuxOsPortableProperties) /p:BuildSdkDeb=true
176+
osProperties: $(linuxOsglibcProperties)
199177
runTests: false
200-
- categoryName: Portable
201-
container: centosStream9
178+
### glibc ###
179+
- categoryName: glibc
202180
# Do not publish zips and tarballs. The linux-x64 binaries are already published by Official.
203181
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
204182
officialBuildProperties: $(_officialBuildProperties)
205-
osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true
183+
osProperties: $(linuxOsglibcProperties) /p:BuildSdkDeb=true
206184
runTests: false
207-
- categoryName: Portable
208-
container: centosStream9
185+
- categoryName: glibc
209186
targetArchitecture: arm64
210187
runtimeIdentifier: linux-arm64
211188
# Do not publish zips and tarballs. The linux-arm64 binaries are already published by Official.
212189
publishArgument: $(_publishArgument) /p:PublishBinariesAndBadge=false
213190
officialBuildProperties: $(_officialBuildProperties)
214-
osProperties: $(linuxOsPortableProperties) /p:IsRPMBasedDistro=true
191+
osProperties: $(linuxOsglibcProperties) /p:BuildSdkDeb=true
215192
runTests: false
216-
### MUSL ###
217-
- categoryName: Musl
218-
container: alpine322Amd64
193+
### musl ###
194+
- categoryName: musl
195+
container: azureLinux30Net10BuildAmd64
219196
runtimeIdentifier: linux-musl-x64
220197
publishArgument: $(_publishArgument)
221198
officialBuildProperties: $(_officialBuildProperties)
@@ -224,15 +201,15 @@ extends:
224201
# SBOM generation is not supported for alpine.
225202
enableSbom: false
226203
runTests: false
227-
- categoryName: Musl
228-
container: mariner20CrossArm
204+
- categoryName: musl
205+
container: azureLinux30Net10BuildAmd64
229206
targetArchitecture: arm
230207
runtimeIdentifier: linux-musl-arm
231208
publishArgument: $(_publishArgument)
232209
officialBuildProperties: $(_officialBuildProperties)
233210
osProperties: /p:OSName=linux-musl
234211
runTests: false
235-
- categoryName: Musl
212+
- categoryName: musl
236213
targetArchitecture: arm64
237214
runtimeIdentifier: linux-musl-arm64
238215
publishArgument: $(_publishArgument)

.vsts-pr.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,8 @@ variables:
2727

2828
resources:
2929
containers:
30-
- container: alpine322Amd64
31-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.22-amd64
32-
- container: centosStream9
33-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream9
34-
- container: debian12Amd64
35-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:debian-12-gcc15-amd64
36-
- container: fedora39
37-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-39
38-
- container: ubuntu2204DebPkg
39-
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-debpkg
30+
- container: azureLinux30Net10BuildAmd64
31+
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-build-amd64
4032

4133
stages:
4234
############### BUILD STAGE ###############

eng/Badge.proj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<PropertyGroup>
1010
<!-- Replace '-' with '_' for os names like 'linux-musl' -->
1111
<VersionBadgeMoniker>$(OSName.Replace('-', '_'))_$(TargetArchitecture)</VersionBadgeMoniker>
12-
<VersionBadgeMoniker Condition="'$(IsLinuxPortable)' == 'true'">linux_$(TargetArchitecture)</VersionBadgeMoniker>
1312

1413
<VersionBadge>$(ArtifactsShippingPackagesDir)$(VersionBadgeMoniker)_$(Configuration)_version_badge.svg</VersionBadge>
1514
<VersionSvgTemplate>$(MSBuildThisFileDirectory)version_badge.svg</VersionSvgTemplate>

eng/pipelines/templates/jobs/sdk-job-matrix.yml

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,49 +21,20 @@ parameters:
2121
### LINUX ###
2222
linuxJobParameterSets:
2323
- categoryName: TestBuild
24-
osProperties: $(linuxOsPortableProperties)
24+
osProperties: $(linuxOsglibcProperties)
2525
- categoryName: TestBuild
2626
targetArchitecture: arm64
2727
runtimeIdentifier: linux-arm64
28-
osProperties: $(linuxOsPortableProperties)
28+
osProperties: $(linuxOsglibcProperties)
2929
# Don't run the tests on arm64. Only perform the build itself.
3030
runTests: false
3131
- categoryName: ContainerBased
32-
container: ubuntu2204DebPkg
33-
helixTargetContainer: $(helixTargetContainerPrefix)ubuntu-22.04-helix-amd64
34-
osProperties: $(linuxOsPortableProperties)
35-
runTests: true
36-
- categoryName: ContainerBased
37-
container: fedora39
38-
# No fedora Helix container is available, so use the ubuntu one instead.
39-
helixTargetContainer: $(helixTargetContainerPrefix)ubuntu-22.04-helix-amd64
40-
osProperties: $(linuxOsPortableProperties)
41-
# Skipping all container-based testing for now.
42-
# See: https://github.com/dotnet/sdk/issues/40935
43-
runTests: false
44-
- categoryName: ContainerBased
45-
container: centosStream9
46-
helixTargetContainer: $(helixTargetContainerPrefix)centos-stream9-helix
47-
osProperties: /p:OSName=linux
48-
runTests: true
49-
- categoryName: ContainerBased
50-
container: debian12Amd64
51-
helixTargetContainer: $(helixTargetContainerPrefix)debian-11-helix-amd64
32+
container: azureLinux30Net10BuildAmd64
33+
helixTargetContainer: $(helixTargetContainerPrefix)ubuntu-24.04-helix-amd64
5234
osProperties: /p:OSName=linux /p:BuildSdkDeb=true
5335
runTests: true
54-
- categoryName: ContainerBased
55-
container: alpine322Amd64
56-
helixTargetContainer: $(helixTargetContainerPrefix)alpine-3.22-helix-amd64
57-
runtimeIdentifier: linux-musl-x64
58-
# Use HostOSName when running on alpine.
59-
osProperties: /p:HostOSName=linux-musl
60-
# SBOM generation is not supported for alpine.
61-
enableSbom: false
62-
# Skipping all container-based testing for now.
63-
# See: https://github.com/dotnet/sdk/issues/40935
64-
runTests: false
6536
- categoryName: TemplateEngine
66-
osProperties: $(linuxOsPortableProperties)
37+
osProperties: $(linuxOsglibcProperties)
6738
testProjects: $(Build.SourcesDirectory)/test/Microsoft.TemplateEngine.Cli.UnitTests/Microsoft.TemplateEngine.Cli.UnitTests.csproj;$(Build.SourcesDirectory)/test/dotnet-new.IntegrationTests/dotnet-new.IntegrationTests.csproj
6839
publishXunitResults: true
6940
### MACOS ###

eng/pipelines/templates/variables/sdk-defaults.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
variables:
22
############### BUILD ###############
33
buildConfiguration: Release
4-
linuxOsPortableProperties: /p:OSName=linux /p:IsLinuxPortable=true
4+
linuxOsglibcProperties: /p:OSName=linux
55
helixTargetContainerPrefix: '@mcr.microsoft.com/dotnet-buildtools/prereqs:'
66

77
############### ARCADE ###############

test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildASelfContainedApp.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public GivenThatWeWantToBuildASelfContainedApp(ITestOutputHelper log) : base(log
1515
{
1616
}
1717

18-
[Theory]
18+
// Some netcoreapp2.0 Linux tests are no longer working on ubuntu 2404
19+
[PlatformSpecificTheory(TestPlatforms.Windows | TestPlatforms.OSX)]
1920
[InlineData("netcoreapp1.1", false)]
2021
[InlineData("netcoreapp2.0", false)]
2122
[InlineData("netcoreapp3.0", true)]

test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ public void It_publishes_self_contained_apps_to_the_publish_folder_and_the_app_s
7171
return;
7272
}
7373

74+
// Some netcoreapp2.0 Linux tests are no longer working on ubuntu 2404
75+
if (targetFramework == "netcoreapp2.0" && OperatingSystem.IsLinux())
76+
{
77+
return;
78+
}
79+
7480
var rid = EnvironmentInfo.GetCompatibleRid(targetFramework);
7581

7682
var helloWorldAsset = _testAssetsManager
@@ -228,7 +234,8 @@ public void Conflicts_are_resolved_when_publishing_a_portable_app()
228234
Conflicts_are_resolved_when_publishing(selfContained: false, ridSpecific: false);
229235
}
230236

231-
[Fact]
237+
// This test is for netcoreapp2 and no longer working on ubuntu 2404
238+
[PlatformSpecificFact(TestPlatforms.Windows | TestPlatforms.OSX)]
232239
public void Conflicts_are_resolved_when_publishing_a_self_contained_app()
233240
{
234241
Conflicts_are_resolved_when_publishing(selfContained: true, ridSpecific: true);

test/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAWebApp.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public void It_publishes_as_framework_dependent_by_default()
4949
});
5050
}
5151

52-
[Fact]
52+
// This test is for netcoreapp2 and no longer working on ubuntu 2404
53+
[PlatformSpecificFact(TestPlatforms.Windows | TestPlatforms.OSX)]
5354
public void It_should_publish_self_contained_for_2x()
5455
{
5556
var tfm = "netcoreapp2.2";
@@ -109,6 +110,8 @@ public void It_should_publish_self_contained_for_2x()
109110
[InlineData("Microsoft.AspNetCore.All")]
110111
public void It_should_publish_framework_dependent_for_2x(string platformLibrary)
111112
{
113+
114+
112115
var tfm = "netcoreapp2.2";
113116

114117
var testProject = new TestProject()

0 commit comments

Comments
 (0)