Enable ubuntu16 deb creation and publishing
This commit is contained in:
parent
2663d03dc9
commit
f75ee876d8
4 changed files with 78 additions and 14 deletions
|
@ -13,16 +13,25 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
public class DebTargets
|
public class DebTargets
|
||||||
{
|
{
|
||||||
[Target(nameof(GenerateSdkDeb))]
|
[Target(nameof(GenerateSdkDeb))]
|
||||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||||
public static BuildTargetResult GenerateDebs(BuildTargetContext c)
|
public static BuildTargetResult GenerateDebs(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
return c.Success();
|
return c.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Target(nameof(InstallSharedFramework))]
|
[Target(nameof(InstallSharedFramework))]
|
||||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||||
public static BuildTargetResult GenerateSdkDeb(BuildTargetContext c)
|
public static BuildTargetResult GenerateSdkDeb(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
|
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
|
||||||
|
// So we need to skip this target if the tools aren't present.
|
||||||
|
// https://github.com/dotnet/core-setup/issues/167
|
||||||
|
if (DebuildNotPresent())
|
||||||
|
{
|
||||||
|
c.Info("Debuild not present, skipping target: {nameof(RemovePackages)}");
|
||||||
|
return c.Success();
|
||||||
|
}
|
||||||
|
|
||||||
var channel = c.BuildContext.Get<string>("Channel").ToLower();
|
var channel = c.BuildContext.Get<string>("Channel").ToLower();
|
||||||
var packageName = Monikers.GetSdkDebianPackageName(c);
|
var packageName = Monikers.GetSdkDebianPackageName(c);
|
||||||
var version = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
var version = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
||||||
|
@ -61,7 +70,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[Target(nameof(InstallSDK),
|
[Target(nameof(InstallSDK),
|
||||||
nameof(RunE2ETest),
|
nameof(RunE2ETest),
|
||||||
nameof(RemovePackages))]
|
nameof(RemovePackages))]
|
||||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||||
public static BuildTargetResult TestDebInstaller(BuildTargetContext c)
|
public static BuildTargetResult TestDebInstaller(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
return c.Success();
|
return c.Success();
|
||||||
|
@ -70,6 +79,15 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[Target]
|
[Target]
|
||||||
public static BuildTargetResult InstallSharedHost(BuildTargetContext c)
|
public static BuildTargetResult InstallSharedHost(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
|
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
|
||||||
|
// So we need to skip this target if the tools aren't present.
|
||||||
|
// https://github.com/dotnet/core-setup/issues/167
|
||||||
|
if (DebuildNotPresent())
|
||||||
|
{
|
||||||
|
c.Info("Debuild not present, skipping target: {nameof(RemovePackages)}");
|
||||||
|
return c.Success();
|
||||||
|
}
|
||||||
|
|
||||||
InstallPackage(c.BuildContext.Get<string>("SharedHostInstallerFile"));
|
InstallPackage(c.BuildContext.Get<string>("SharedHostInstallerFile"));
|
||||||
|
|
||||||
return c.Success();
|
return c.Success();
|
||||||
|
@ -78,6 +96,15 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[Target(nameof(InstallSharedHost))]
|
[Target(nameof(InstallSharedHost))]
|
||||||
public static BuildTargetResult InstallHostFxr(BuildTargetContext c)
|
public static BuildTargetResult InstallHostFxr(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
|
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
|
||||||
|
// So we need to skip this target if the tools aren't present.
|
||||||
|
// https://github.com/dotnet/core-setup/issues/167
|
||||||
|
if (DebuildNotPresent())
|
||||||
|
{
|
||||||
|
c.Info("Debuild not present, skipping target: {nameof(RemovePackages)}");
|
||||||
|
return c.Success();
|
||||||
|
}
|
||||||
|
|
||||||
InstallPackage(c.BuildContext.Get<string>("HostFxrInstallerFile"));
|
InstallPackage(c.BuildContext.Get<string>("HostFxrInstallerFile"));
|
||||||
|
|
||||||
return c.Success();
|
return c.Success();
|
||||||
|
@ -86,6 +113,15 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[Target(nameof(InstallHostFxr))]
|
[Target(nameof(InstallHostFxr))]
|
||||||
public static BuildTargetResult InstallSharedFramework(BuildTargetContext c)
|
public static BuildTargetResult InstallSharedFramework(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
|
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
|
||||||
|
// So we need to skip this target if the tools aren't present.
|
||||||
|
// https://github.com/dotnet/core-setup/issues/167
|
||||||
|
if (DebuildNotPresent())
|
||||||
|
{
|
||||||
|
c.Info("Debuild not present, skipping target: {nameof(RemovePackages)}");
|
||||||
|
return c.Success();
|
||||||
|
}
|
||||||
|
|
||||||
InstallPackage(c.BuildContext.Get<string>("SharedFrameworkInstallerFile"));
|
InstallPackage(c.BuildContext.Get<string>("SharedFrameworkInstallerFile"));
|
||||||
|
|
||||||
return c.Success();
|
return c.Success();
|
||||||
|
@ -94,15 +130,33 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[Target(nameof(InstallSharedFramework))]
|
[Target(nameof(InstallSharedFramework))]
|
||||||
public static BuildTargetResult InstallSDK(BuildTargetContext c)
|
public static BuildTargetResult InstallSDK(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
|
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
|
||||||
|
// So we need to skip this target if the tools aren't present.
|
||||||
|
// https://github.com/dotnet/core-setup/issues/167
|
||||||
|
if (DebuildNotPresent())
|
||||||
|
{
|
||||||
|
c.Info("Debuild not present, skipping target: {nameof(RemovePackages)}");
|
||||||
|
return c.Success();
|
||||||
|
}
|
||||||
|
|
||||||
InstallPackage(c.BuildContext.Get<string>("SdkInstallerFile"));
|
InstallPackage(c.BuildContext.Get<string>("SdkInstallerFile"));
|
||||||
|
|
||||||
return c.Success();
|
return c.Success();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Target]
|
[Target]
|
||||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||||
public static BuildTargetResult RunE2ETest(BuildTargetContext c)
|
public static BuildTargetResult RunE2ETest(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
|
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
|
||||||
|
// So we need to skip this target if the tools aren't present.
|
||||||
|
// https://github.com/dotnet/core-setup/issues/167
|
||||||
|
if (DebuildNotPresent())
|
||||||
|
{
|
||||||
|
c.Info("Debuild not present, skipping target: {nameof(RemovePackages)}");
|
||||||
|
return c.Success();
|
||||||
|
}
|
||||||
|
|
||||||
Directory.SetCurrentDirectory(Path.Combine(Dirs.RepoRoot, "test", "EndToEnd"));
|
Directory.SetCurrentDirectory(Path.Combine(Dirs.RepoRoot, "test", "EndToEnd"));
|
||||||
|
|
||||||
Cmd("dotnet", "build")
|
Cmd("dotnet", "build")
|
||||||
|
@ -119,9 +173,18 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
}
|
}
|
||||||
|
|
||||||
[Target]
|
[Target]
|
||||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||||
public static BuildTargetResult RemovePackages(BuildTargetContext c)
|
public static BuildTargetResult RemovePackages(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
|
// Ubuntu 16.04 Jenkins Machines don't have docker or debian package build tools
|
||||||
|
// So we need to skip this target if the tools aren't present.
|
||||||
|
// https://github.com/dotnet/core-setup/issues/167
|
||||||
|
if (DebuildNotPresent())
|
||||||
|
{
|
||||||
|
c.Info("Debuild not present, skipping target: {nameof(RemovePackages)}");
|
||||||
|
return c.Success();
|
||||||
|
}
|
||||||
|
|
||||||
IEnumerable<string> orderedPackageNames = new List<string>()
|
IEnumerable<string> orderedPackageNames = new List<string>()
|
||||||
{
|
{
|
||||||
Monikers.GetSdkDebianPackageName(c),
|
Monikers.GetSdkDebianPackageName(c),
|
||||||
|
@ -151,5 +214,10 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
.Execute()
|
.Execute()
|
||||||
.EnsureSuccessful();
|
.EnsureSuccessful();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static bool DebuildNotPresent()
|
||||||
|
{
|
||||||
|
return Cmd("/usr/bin/env", "debuild", "-h").Execute().ExitCode != 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -209,11 +209,6 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
[BuildPlatforms(BuildPlatform.Windows, BuildPlatform.OSX, BuildPlatform.Ubuntu)]
|
[BuildPlatforms(BuildPlatform.Windows, BuildPlatform.OSX, BuildPlatform.Ubuntu)]
|
||||||
public static BuildTargetResult DownloadHostAndSharedFxInstallers(BuildTargetContext c)
|
public static BuildTargetResult DownloadHostAndSharedFxInstallers(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
if (CurrentPlatform.IsUbuntu && !CurrentPlatform.IsVersion("14.04"))
|
|
||||||
{
|
|
||||||
return c.Success();
|
|
||||||
}
|
|
||||||
|
|
||||||
var sharedFrameworkVersion = CliDependencyVersions.SharedFrameworkVersion;
|
var sharedFrameworkVersion = CliDependencyVersions.SharedFrameworkVersion;
|
||||||
var hostVersion = CliDependencyVersions.SharedHostVersion;
|
var hostVersion = CliDependencyVersions.SharedHostVersion;
|
||||||
var hostFxrVersion = CliDependencyVersions.HostFxrVersion;
|
var hostFxrVersion = CliDependencyVersions.HostFxrVersion;
|
||||||
|
|
|
@ -196,7 +196,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
[Target(
|
[Target(
|
||||||
nameof(PublishSdkDebToDebianRepo))]
|
nameof(PublishSdkDebToDebianRepo))]
|
||||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||||
public static BuildTargetResult PublishDebFilesToDebianRepo(BuildTargetContext c)
|
public static BuildTargetResult PublishDebFilesToDebianRepo(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
return c.Success();
|
return c.Success();
|
||||||
|
@ -212,7 +212,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
}
|
}
|
||||||
|
|
||||||
[Target]
|
[Target]
|
||||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||||
public static BuildTargetResult PublishSdkInstallerFileToAzure(BuildTargetContext c)
|
public static BuildTargetResult PublishSdkInstallerFileToAzure(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
var version = CliNuGetVersion;
|
var version = CliNuGetVersion;
|
||||||
|
@ -270,7 +270,7 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
}
|
}
|
||||||
|
|
||||||
[Target]
|
[Target]
|
||||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||||
public static BuildTargetResult PublishSdkDebToDebianRepo(BuildTargetContext c)
|
public static BuildTargetResult PublishSdkDebToDebianRepo(BuildTargetContext c)
|
||||||
{
|
{
|
||||||
var version = CliNuGetVersion;
|
var version = CliNuGetVersion;
|
||||||
|
|
|
@ -28,7 +28,8 @@ RUN apt-get install -y libunwind8 \
|
||||||
liblttng-ust0 \
|
liblttng-ust0 \
|
||||||
libssl1.0.0 \
|
libssl1.0.0 \
|
||||||
zlib1g \
|
zlib1g \
|
||||||
libuuid1 && \
|
libuuid1 \
|
||||||
|
liblldb-3.6 && \
|
||||||
apt-get clean
|
apt-get clean
|
||||||
|
|
||||||
# Setup User to match Host User, and give superuser permissions
|
# Setup User to match Host User, and give superuser permissions
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue