Skip to content

Commit 64ea37a

Browse files
committed
Revert "testing the linux native binaries in docker containers testing the linux native binaries in docker containers"
This reverts commit cabd57f38156dc925bcdef1a650383e3ac26d2bb.
1 parent cc27011 commit 64ea37a

File tree

6 files changed

+9
-41
lines changed

6 files changed

+9
-41
lines changed

build/artifacts-test.cake

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ singleStageRun = !IsEnabled(Context, "ENABLED_MULTI_STAGE_BUILD", false);
33
Task("Artifacts-Prepare")
44
.WithCriteria<BuildParameters>((context, parameters) => !parameters.IsRunningOnMacOS, "Artifacts-Prepare can be tested only on Windows or Linux agents.")
55
.WithCriteria<BuildParameters>((context, parameters) => parameters.IsReleasingCI, "Artifacts-Prepare works only on Releasing CI.")
6-
.IsDependentOnWhen("Zip-Files", singleStageRun)
76
.IsDependentOnWhen("Pack-Nuget", singleStageRun)
87
.Does<BuildParameters>((parameters) =>
98
{
@@ -30,25 +29,6 @@ Task("Artifacts-DotnetTool-Test")
3029
}
3130
});
3231

33-
Task("Artifacts-Native-Test")
34-
.WithCriteria<BuildParameters>((context, parameters) => parameters.IsRunningOnLinux, "Artifacts-Native-Test can be tested only on Linux agents.")
35-
.WithCriteria<BuildParameters>((context, parameters) => parameters.IsReleasingCI, "Artifacts-Native-Test works only on Releasing CI.")
36-
.IsDependentOn("Artifacts-Prepare")
37-
.Does<BuildParameters>((parameters) =>
38-
{
39-
var rootPrefix = parameters.DockerRootPrefix;
40-
var version = parameters.Version.NugetVersion;
41-
42-
foreach(var dockerImage in parameters.Docker.Images)
43-
{
44-
var (os, distro, targetframework) = dockerImage;
45-
46-
var cmd = $"-file {rootPrefix}/scripts/Test-Native.ps1 -repoPath {rootPrefix}/repo -runtime {distro}";
47-
48-
DockerTestArtifact(dockerImage, parameters, cmd);
49-
}
50-
});
51-
5232
Task("Artifacts-MsBuildCore-Test")
5333
.WithCriteria<BuildParameters>((context, parameters) => !parameters.IsRunningOnMacOS, "Artifacts-MsBuildCore-Test can be tested only on Windows or Linux agents.")
5434
.WithCriteria<BuildParameters>((context, parameters) => parameters.IsReleasingCI, "Artifacts-MsBuildCore-Test works only on Releasing CI.")
@@ -120,6 +100,5 @@ Task("Artifacts-MsBuildFull-Test")
120100
Task("Artifacts-Test")
121101
.WithCriteria<BuildParameters>((context, parameters) => !parameters.IsRunningOnMacOS, "Artifacts-Test can be tested only on Windows or Linux agents.")
122102
.WithCriteria<BuildParameters>((context, parameters) => parameters.IsReleasingCI, "Artifacts-Test works only on Releasing CI.")
123-
.IsDependentOn("Artifacts-Native-Test")
124103
.IsDependentOn("Artifacts-DotnetTool-Test")
125104
.IsDependentOn("Artifacts-MsBuildCore-Test");

build/pack.cake

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,8 @@ void PackPrepareNative(ICakeContext context, BuildParameters parameters)
154154

155155
context.Information("Validating native lib:");
156156

157-
// testing windows and macos artifacts, ther linux is tested with docker
158-
if (platform != PlatformFamily.Linux)
159-
{
160-
var nativeExe = outputPath.CombineWithFilePath(IsRunningOnWindows() ? "gitversion.exe" : "gitversion");
161-
ValidateOutput(nativeExe.FullPath, "/showvariable FullSemver", parameters.Version.GitVersion.FullSemVer);
162-
}
157+
var nativeExe = outputPath.CombineWithFilePath(IsRunningOnWindows() ? "gitversion.exe" : "gitversion");
158+
ValidateOutput(nativeExe.FullPath, "/showvariable FullSemver", parameters.Version.GitVersion.FullSemVer);
163159
}
160+
164161
}

build/utils/docker.cake

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,14 @@ void DockerPullImage(DockerImage dockerImage, BuildParameters parameters)
109109
DockerContainerRunSettings GetDockerRunSettings(BuildParameters parameters)
110110
{
111111
var currentDir = MakeAbsolute(Directory("."));
112-
var root = parameters.DockerRootPrefix;
113112
var settings = new DockerContainerRunSettings
114113
{
115114
Rm = true,
116115
Volume = new[]
117116
{
118-
$"{currentDir}:{root}/repo",
119-
$"{currentDir}/test-scripts:{root}/scripts",
120-
$"{currentDir}/artifacts/v{parameters.Version.SemVersion}/nuget:{root}/nuget",
121-
$"{currentDir}/artifacts/v{parameters.Version.SemVersion}/native/linux:{root}/native",
117+
$"{currentDir}:{parameters.DockerRootPrefix}/repo",
118+
$"{currentDir}/artifacts/v{parameters.Version.SemVersion}/nuget:{parameters.DockerRootPrefix}/nuget",
119+
$"{currentDir}/test-scripts:{parameters.DockerRootPrefix}/scripts"
122120
}
123121
};
124122

build/utils/parameters.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public class BuildParameters
141141
NativeRuntimes = new Dictionary<PlatformFamily, string[]>
142142
{
143143
[PlatformFamily.Windows] = new[] { "win-x64", "win-x86" },
144-
[PlatformFamily.Linux] = new[] { "debian.9-x64", "centos.7-x64", "fedora.30-x64", "ubuntu.16.04-x64", "ubuntu.18.04-x64" },
144+
[PlatformFamily.Linux] = new[] { "linux-x64" },
145145
[PlatformFamily.OSX] = new[] { "osx-x64" },
146146
};
147147

test-scripts/Test-DotnetGlobalTool.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ param(
44
[parameter(Mandatory=$true, Position=2)][string] $repoPath
55
)
66

7-
$result = dotnet tool install GitVersion.Tool --version $version --tool-path /tools --add-source $nugetPath | out-null;
7+
$result = dotnet tool install GitVersion.Tool --version $version --tool-path $rootPrefix/tools --add-source $nugetPath | out-null;
88

99
if($LASTEXITCODE -eq 0) {
10-
& "/tools/dotnet-gitversion" $repoPath /showvariable FullSemver;
10+
& "$rootPrefix/tools/dotnet-gitversion" $repoPath /showvariable FullSemver;
1111
} else {
1212
Write-Output $result
1313
}

test-scripts/Test-Native.ps1

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)