Add publishing for sdk, sharedhost, sharedfx deb files
small fix disable dotnet-nightly train avoidance, alawys use the same debian config for now
This commit is contained in:
parent
1c38b17f8b
commit
96664f31c2
4 changed files with 48 additions and 10 deletions
|
@ -168,7 +168,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
{
|
||||
IEnumerable<string> orderedPackageNames = new List<string>()
|
||||
{
|
||||
Monikers.GetDebianPackageName(c),
|
||||
Monikers.GetSdkDebianPackageName(c),
|
||||
Monikers.GetDebianSharedFrameworkPackageName(c),
|
||||
Monikers.GetDebianSharedHostPackageName(c)
|
||||
};
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
[Target(
|
||||
nameof(PublishTargets.PublishVersionBadge),
|
||||
nameof(PublishTargets.PublishSdkInstallerFile),
|
||||
//nameof(PublishTargets.PublishDebFileToDebianRepo),
|
||||
nameof(PublishTargets.PublishDebFilesToDebianRepo),
|
||||
nameof(PublishTargets.PublishCombinedFrameworkSDKHostFile),
|
||||
nameof(PublishTargets.PublishCombinedFrameworkHostFile),
|
||||
nameof(PublishTargets.PublishLatestVersionTextFile))]
|
||||
|
@ -93,11 +93,21 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target(nameof(PublishSdkInstallerFile))]
|
||||
[Target(
|
||||
nameof(PublishSdkDebToDebianRepo),
|
||||
nameof(PublishSharedFrameworkDebToDebianRepo),
|
||||
nameof(PublishSharedHostDebToDebianRepo))]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult PublishDebFileToDebianRepo(BuildTargetContext c)
|
||||
public static BuildTargetResult PublishDebFilesToDebianRepo(BuildTargetContext c)
|
||||
{
|
||||
var packageName = Monikers.GetDebianPackageName(c);
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult PublishSdkDebToDebianRepo(BuildTargetContext c)
|
||||
{
|
||||
var packageName = Monikers.GetSdkDebianPackageName(c);
|
||||
var installerFile = c.BuildContext.Get<string>("SdkInstallerFile");
|
||||
var uploadUrl = $"https://dotnetcli.blob.core.windows.net/dotnet/{Channel}/Installers/{Version}/{Path.GetFileName(installerFile)}";
|
||||
var uploadJson = GenerateUploadJsonFile(packageName, Version, uploadUrl);
|
||||
|
@ -109,6 +119,38 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult PublishSharedFrameworkDebToDebianRepo(BuildTargetContext c)
|
||||
{
|
||||
var packageName = Monikers.GetDebianSharedFrameworkPackageName(c);
|
||||
var installerFile = c.BuildContext.Get<string>("SharedFrameworkInstallerFile");
|
||||
var uploadUrl = $"https://dotnetcli.blob.core.windows.net/dotnet/{Channel}/Installers/{Version}/{Path.GetFileName(installerFile)}";
|
||||
var uploadJson = GenerateUploadJsonFile(packageName, Version, uploadUrl);
|
||||
|
||||
Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "publish", "repoapi_client.sh"), "-addpkg", uploadJson)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[BuildPlatforms(BuildPlatform.Ubuntu)]
|
||||
public static BuildTargetResult PublishSharedHostDebToDebianRepo(BuildTargetContext c)
|
||||
{
|
||||
var packageName = Monikers.GetDebianSharedHostPackageName(c);
|
||||
var installerFile = c.BuildContext.Get<string>("SharedHostInstallerFile");
|
||||
var uploadUrl = $"https://dotnetcli.blob.core.windows.net/dotnet/{Channel}/Installers/{Version}/{Path.GetFileName(installerFile)}";
|
||||
var uploadJson = GenerateUploadJsonFile(packageName, Version, uploadUrl);
|
||||
|
||||
Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "publish", "repoapi_client.sh"), "-addpkg", uploadJson)
|
||||
.Execute()
|
||||
.EnsureSuccessful();
|
||||
|
||||
return c.Success();
|
||||
}
|
||||
|
||||
[Target]
|
||||
[Environment("DOCKER_HUB_REPO")]
|
||||
[Environment("DOCKER_HUB_TRIGGER_TOKEN")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue