Skip to content

Commit 11613ea

Browse files
committed
net5.0 docker images
1 parent 7f90979 commit 11613ea

File tree

6 files changed

+29
-10
lines changed

6 files changed

+29
-10
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
strategy:
104104
matrix:
105105
os: [linux]
106-
targetFramework: [3.1]
106+
targetFramework: [3.1, 5.0]
107107
distro: [alpine.3.12-x64, centos.7-x64, debian.9-x64, debian.10-x64, fedora.32-x64, ubuntu.16.04-x64, ubuntu.18.04-x64, ubuntu.20.04-x64]
108108
fail-fast: false
109109

@@ -233,7 +233,7 @@ jobs:
233233
strategy:
234234
matrix:
235235
os: [linux]
236-
targetFramework: [3.1]
236+
targetFramework: [3.1, 5.0]
237237
distro: [alpine.3.12-x64, centos.7-x64, debian.9-x64, debian.10-x64, fedora.32-x64, ubuntu.16.04-x64, ubuntu.18.04-x64, ubuntu.20.04-x64]
238238
fail-fast: false
239239

azure-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ stages:
6060
name: Linux
6161
vmImage: 'ubuntu-latest'
6262
distros: [ 'alpine.3.12-x64', 'centos.7-x64', 'debian.9-x64', 'debian.10-x64', 'fedora.32-x64', 'ubuntu.16.04-x64', 'ubuntu.18.04-x64', 'ubuntu.20.04-x64' ]
63-
dotnetVersions: [ '3.1' ]
63+
dotnetVersions: [ '3.1', '5.0' ]
6464

6565
- stage: Artifact_Windows_Test
6666
displayName: 'Artifacts Windows test'
@@ -83,7 +83,7 @@ stages:
8383
name: Linux
8484
vmImage: 'ubuntu-latest'
8585
distros: [ 'alpine.3.12-x64', 'centos.7-x64', 'debian.9-x64', 'debian.10-x64', 'fedora.32-x64', 'ubuntu.16.04-x64', 'ubuntu.18.04-x64', 'ubuntu.20.04-x64' ]
86-
dotnetVersions: [ '3.1' ]
86+
dotnetVersions: [ '3.1', '5.0' ]
8787

8888
- stage: Publish
8989
displayName: 'Publish'

build/artifacts-test.cake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ Task("Artifacts-MsBuildCore-Test")
111111
{
112112
var (os, distro, targetframework) = dockerImage;
113113

114+
if (targetframework == "3.1") {
115+
targetframework = $"netcoreapp{targetframework}";
116+
} else if (targetframework == "5.0") {
117+
targetframework = $"net{targetframework}";
118+
}
119+
114120
var cmd = $"-file {rootPrefix}/scripts/Test-MsBuildCore.ps1 -version {version} -repoPath {rootPrefix}/repo/tests/integration/core -nugetPath {rootPrefix}/nuget -targetframework {targetframework}";
115121

116122
DockerTestArtifact(dockerImage, parameters, cmd);

build/utils/artifacts.cake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public class DockerImages
109109
{
110110
foreach (var distro in ((JArray)targetFramework.Value))
111111
{
112-
dockerImages.Add(new DockerImage(os: osItem.Name, distro: distro.ToString(), targetFramework: $"netcoreapp{targetFramework.Name}"));
112+
dockerImages.Add(new DockerImage(os: osItem.Name, distro: distro.ToString(), targetFramework: $"{targetFramework.Name}"));
113113
}
114114
}
115115
}
@@ -119,7 +119,7 @@ public class DockerImages
119119
}
120120

121121
if (!string.IsNullOrEmpty(parameters.DockerDotnetVersion)) {
122-
dockerImages = dockerImages.Where(x => x.TargetFramework == $"netcoreapp{parameters.DockerDotnetVersion}").ToList();
122+
dockerImages = dockerImages.Where(x => x.TargetFramework == $"{parameters.DockerDotnetVersion}").ToList();
123123
}
124124

125125
var windowsImages = dockerImages.Where(x => x.OS == "windows").ToArray();

build/utils/docker.cake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void DockerBuild(DockerImage dockerImage, BuildParameters parameters)
3737
BuildArg = new []
3838
{
3939
$"contentFolder=/content",
40-
$"DOTNET_VERSION={targetframework.Replace("netcoreapp", "")}",
40+
$"DOTNET_VERSION={targetframework}",
4141
$"DISTRO={distro}",
4242
$"VERSION={parameters.Version.NugetVersion}"
4343
},
@@ -92,7 +92,7 @@ void DockerTestArtifact(DockerImage dockerImage, BuildParameters parameters, str
9292
{
9393
var settings = GetDockerRunSettings(parameters);
9494
var (os, distro, targetframework) = dockerImage;
95-
var tag = $"gittools/build-images:{distro}-sdk-{targetframework.Replace("netcoreapp", "")}";
95+
var tag = $"gittools/build-images:{distro}-sdk-{targetframework}";
9696

9797
Information("Docker tag: {0}", tag);
9898
Information("Docker cmd: pwsh {0}", cmd);
@@ -103,7 +103,7 @@ void DockerTestArtifact(DockerImage dockerImage, BuildParameters parameters, str
103103
void DockerPullImage(DockerImage dockerImage, BuildParameters parameters)
104104
{
105105
var (os, distro, targetframework) = dockerImage;
106-
var tag = $"gittools/build-images:{distro}-sdk-{targetframework.Replace("netcoreapp", "")}";
106+
var tag = $"gittools/build-images:{distro}-sdk-{targetframework}";
107107
DockerPull(tag);
108108
}
109109

@@ -150,7 +150,7 @@ string[] GetDockerTags(DockerImage dockerImage, BuildParameters parameters) {
150150
$"{name}:{parameters.Version.SemVersion}-{os}-{distro}-{targetframework}",
151151
};
152152

153-
if (distro == "debian-9" && targetframework == parameters.CoreFxVersion31 || distro == "nanoserver-1809") {
153+
if (distro == "debian.10-x64" && targetframework == parameters.NetVersion50) {
154154
tags.AddRange(new[] {
155155
$"{name}:{parameters.Version.Version}-{os}",
156156
$"{name}:{parameters.Version.SemVersion}-{os}",

src/Docker/docker.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,24 @@
99
"ubuntu.16.04-x64",
1010
"ubuntu.18.04-x64",
1111
"ubuntu.20.04-x64"
12+
],
13+
"5.0": [
14+
"alpine.3.12-x64",
15+
"centos.7-x64",
16+
"debian.9-x64",
17+
"debian.10-x64",
18+
"fedora.32-x64",
19+
"ubuntu.16.04-x64",
20+
"ubuntu.18.04-x64",
21+
"ubuntu.20.04-x64"
1222
]
1323
},
1424
"windows": {
1525
"3.1": [
1626
"nanoserver"
27+
],
28+
"5.0": [
29+
"nanoserver"
1730
]
1831
}
1932
}

0 commit comments

Comments
 (0)