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()); } var sharedFrameworkNugetVersion = c.BuildContext.Get <string>("SharedFrameworkNugetVersion"); var hostFxrVersion = c.BuildContext.Get <HostVersion>("HostVersion").LockedHostFxrVersion.ToString(); IEnumerable <string> orderedPackageNames = new List <string>() { Monikers.GetDebianSharedFrameworkPackageName(sharedFrameworkNugetVersion), Monikers.GetDebianHostFxrPackageName(hostFxrVersion), Monikers.GetDebianSharedHostPackageName(c) }; foreach (var packageName in orderedPackageNames) { RemovePackage(packageName); } return(c.Success()); }
public static BuildTargetResult PublishHostFxrDebToDebianRepo(BuildTargetContext c) { var version = HostFxrNugetVersion; var packageName = Monikers.GetDebianHostFxrPackageName(version); var installerFile = c.BuildContext.Get <string>("HostFxrInstallerFile"); var uploadUrl = AzurePublisherTool.CalculateInstallerUploadUrl(installerFile, Channel, version); DebRepoPublisherTool.PublishDebFileToDebianRepo( packageName, version, uploadUrl); return(c.Success()); }
public static BuildTargetResult GenerateSharedFrameworkDeb(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(GenerateSharedFrameworkDeb)}"); return(c.Success()); } var sharedFrameworkNugetVersion = c.BuildContext.Get <string>("SharedFrameworkNugetVersion"); var packageName = Monikers.GetDebianSharedFrameworkPackageName(sharedFrameworkNugetVersion); var sharedHostVersion = c.BuildContext.Get <HostVersion>("HostVersion").LockedHostVersion.ToString(); var hostFxrVersion = c.BuildContext.Get <HostVersion>("HostVersion").LockedHostFxrVersion.ToString(); var hostfxrDebianPackageName = Monikers.GetDebianHostFxrPackageName(hostFxrVersion); var version = c.BuildContext.Get <string>("SharedFrameworkNugetVersion"); var inputRoot = c.BuildContext.Get <string>("SharedFrameworkPublishRoot"); var debFile = c.BuildContext.Get <string>("SharedFrameworkInstallerFile"); var debianConfigFile = Path.Combine(Dirs.DebPackagingConfig, "dotnet-sharedframework-debian_config.json"); var debianConfigVariables = new Dictionary <string, string>() { { "SHARED_HOST_DEBIAN_VERSION", sharedHostVersion }, { "HOSTFXR_DEBIAN_PACKAGE_NAME", hostfxrDebianPackageName }, { "HOSTFXR_DEBIAN_VERSION", hostFxrVersion }, { "SHARED_FRAMEWORK_DEBIAN_PACKAGE_NAME", packageName }, { "SHARED_FRAMEWORK_NUGET_NAME", Monikers.SharedFrameworkName }, { "SHARED_FRAMEWORK_NUGET_VERSION", c.BuildContext.Get <string>("SharedFrameworkNugetVersion") }, { "SHARED_FRAMEWORK_BRAND_NAME", Monikers.GetSharedFxBrandName(c) } }; var debCreator = new DebPackageCreator( DotNetCli.Stage0, Dirs.Intermediate, dotnetDebToolPackageSource: Dirs.Packages); debCreator.CreateDeb( debianConfigFile, packageName, version, inputRoot, debianConfigVariables, debFile); return(c.Success()); }