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
|
||||
{
|
||||
[Target(nameof(GenerateSdkDeb))]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult GenerateDebs(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(InstallSharedFramework))]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
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 packageName = Monikers.GetSdkDebianPackageName(c);
|
||||
var version = c.BuildContext.Get<BuildVersion>("BuildVersion").NuGetVersion;
|
||||
|
@ -61,7 +70,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
[Target(nameof(InstallSDK),
|
||||
nameof(RunE2ETest),
|
||||
nameof(RemovePackages))]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult TestDebInstaller(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
|
@ -70,6 +79,15 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
[Target]
|
||||
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"));
|
||||
|
||||
return c.Success();
|
||||
|
@ -78,6 +96,15 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
[Target(nameof(InstallSharedHost))]
|
||||
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"));
|
||||
|
||||
return c.Success();
|
||||
|
@ -86,6 +113,15 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
[Target(nameof(InstallHostFxr))]
|
||||
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"));
|
||||
|
||||
return c.Success();
|
||||
|
@ -94,15 +130,33 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
[Target(nameof(InstallSharedFramework))]
|
||||
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"));
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
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"));
|
||||
|
||||
Cmd("dotnet", "build")
|
||||
|
@ -119,9 +173,18 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
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>()
|
||||
{
|
||||
Monikers.GetSdkDebianPackageName(c),
|
||||
|
@ -151,5 +214,10 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
.Execute()
|
||||
.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)]
|
||||
public static BuildTargetResult DownloadHostAndSharedFxInstallers(BuildTargetContext c)
|
||||
{
|
||||
if (CurrentPlatform.IsUbuntu && !CurrentPlatform.IsVersion("14.04"))
|
||||
{
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
var sharedFrameworkVersion = CliDependencyVersions.SharedFrameworkVersion;
|
||||
var hostVersion = CliDependencyVersions.SharedHostVersion;
|
||||
var hostFxrVersion = CliDependencyVersions.HostFxrVersion;
|
||||
|
|
|
@ -196,7 +196,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
[Target(
|
||||
nameof(PublishSdkDebToDebianRepo))]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult PublishDebFilesToDebianRepo(BuildTargetContext c)
|
||||
{
|
||||
return c.Success();
|
||||
|
@ -212,7 +212,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult PublishSdkInstallerFileToAzure(BuildTargetContext c)
|
||||
{
|
||||
var version = CliNuGetVersion;
|
||||
|
@ -270,7 +270,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu, "14.04")]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult PublishSdkDebToDebianRepo(BuildTargetContext c)
|
||||
{
|
||||
var version = CliNuGetVersion;
|
||||
|
|
|
@ -28,7 +28,8 @@ RUN apt-get install -y libunwind8 \
|
|||
liblttng-ust0 \
|
||||
libssl1.0.0 \
|
||||
zlib1g \
|
||||
libuuid1 && \
|
||||
libuuid1 \
|
||||
liblldb-3.6 && \
|
||||
apt-get clean
|
||||
|
||||
# Setup User to match Host User, and give superuser permissions
|
||||
|
|
Loading…
Reference in a new issue