Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.NET 7 feed updates #10205

Merged
merged 1 commit into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions eng/common/SetupNugetSources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -146,22 +146,22 @@ $userName = "dn-bot"
# Insert credential nodes for Maestro's private feeds
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -Password $Password

# 3.1 uses a different feed url format so it's handled differently here
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
if ($dotnet31Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
}

$dotnet5Source = $sources.SelectSingleNode("add[@key='dotnet5']")
if ($dotnet5Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet5-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet5-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
}
$dotnetVersions = @('5','6','7')

$dotnet6Source = $sources.SelectSingleNode("add[@key='dotnet6']")
if ($dotnet6Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet6-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet6-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
foreach ($dotnetVersion in $dotnetVersions) {
$feedPrefix = "dotnet" + $dotnetVersion;
$dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']")
if ($dotnetSource -ne $null) {
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
}
}

$doc.Save($filename)
68 changes: 24 additions & 44 deletions eng/common/SetupNugetSources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,53 +105,33 @@ if [ "$?" == "0" ]; then
PackageSources+=('dotnet3.1-internal-transport')
fi

# Ensure dotnet5-internal and dotnet5-internal-transport are in the packageSources if the public dotnet5 feeds are present
grep -i "<add key=\"dotnet5\"" $ConfigFile
if [ "$?" == "0" ]; then
grep -i "<add key=\"dotnet5-internal\"" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet5-internal to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet5-internal\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal/nuget/v2\" />"

sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet5-internal')

grep -i "<add key=\"dotnet5-internal-transport\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet5-internal-transport to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet5-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v2\" />"

sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet5-internal-transport')
fi

# Ensure dotnet6-internal and dotnet6-internal-transport are in the packageSources if the public dotnet6 feeds are present
grep -i "<add key=\"dotnet6\"" $ConfigFile
if [ "$?" == "0" ]; then
grep -i "<add key=\"dotnet6-internal\"" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet6-internal to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet6-internal\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal/nuget/v2\" />"
DotNetVersions=('5' '6' '7')

for DotNetVersion in ${DotNetVersions[@]} ; do
FeedPrefix="dotnet${DotNetVersion}";
grep -i "<add key=\"$FeedPrefix\"" $ConfigFile
if [ "$?" == "0" ]; then
grep -i "<add key=\"$FeedPrefix-internal\"" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding $FeedPrefix-internal to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"$FeedPrefix-internal\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/$FeedPrefix-internal/nuget/v2\" />"

sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=("$FeedPrefix-internal")

sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=('dotnet6-internal')
grep -i "<add key=\"$FeedPrefix-internal-transport\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding $FeedPrefix-internal-transport to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"$FeedPrefix-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/$FeedPrefix-internal-transport/nuget/v2\" />"

grep -i "<add key=\"dotnet6-internal-transport\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet6-internal-transport to the packageSources."
PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet6-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal-transport/nuget/v2\" />"

sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
fi
PackageSources+=("$FeedPrefix-internal-transport")
fi
PackageSources+=('dotnet6-internal-transport')
fi
done

# I want things split line by line
PrevIFS=$IFS
Expand Down
103 changes: 47 additions & 56 deletions src/Microsoft.DotNet.Build.Tasks.Feed/src/model/PublishingConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ public enum BuildQuality
private const string FeedDotNet7Shipping = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json";
private const string FeedDotNet7Transport = "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7-transport/nuget/v3/index.json";

private const string FeedDotNet7InternalShipping = "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet7-internal/nuget/v3/index.json";
private const string FeedDotNet7InternalTransport = "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet7-internal-transport/nuget/v3/index.json";

private const string FeedDotNet6InternalShipping = "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal/nuget/v3/index.json";
private const string FeedDotNet6InternalTransport = "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal-transport/nuget/v3/index.json";

Expand Down Expand Up @@ -201,6 +204,14 @@ public enum BuildQuality
(TargetFeedContentType.Checksum, FeedStagingForChecksums),
};

private static TargetFeedSpecification[] DotNet7InternalFeeds =
{
(TargetFeedContentType.Package, FeedDotNet7InternalShipping, AssetSelection.ShippingOnly),
(TargetFeedContentType.Package, FeedDotNet7InternalTransport, AssetSelection.NonShippingOnly),
(InstallersAndSymbols, FeedStagingInternalForInstallers),
(TargetFeedContentType.Checksum, FeedStagingInternalForChecksums),
};

private static TargetFeedSpecification[] DotNetEngFeeds =
{
(TargetFeedContentType.Package, FeedDotNetEng, AssetSelection.ShippingOnly),
Expand Down Expand Up @@ -282,44 +293,24 @@ public enum BuildQuality
PublicAndInternalSymbolTargets,
filenamesToExclude: FilenamesToExclude),

// ".NET 7 preview 5",
new TargetChannelConfig(
2699,
false,
PublishingInfraVersion.All,
new List<string>() { "7.0-preview5" },
DotNet7Feeds,
PublicAndInternalSymbolTargets,
filenamesToExclude: FilenamesToExclude),

// ".NET 7 SDK 7.0.1xx Preview 5",
// ".NET 7 Internal",
new TargetChannelConfig(
2702,
false,
PublishingInfraVersion.All,
new List<string>() { "7.0.1xx-preview5", "7.0-preview5" },
DotNet7Feeds,
PublicAndInternalSymbolTargets,
filenamesToExclude: FilenamesToExclude),

// ".NET 7 Preview 6",
new TargetChannelConfig(
2700,
false,
3035,
true,
PublishingInfraVersion.All,
new List<string>() { "7.0-preview6" },
DotNet7Feeds,
PublicAndInternalSymbolTargets,
new List<string>() { "internal/7.0" },
DotNet7InternalFeeds,
InternalSymbolTargets,
filenamesToExclude: FilenamesToExclude),

// ".NET 7 SDK 7.0.1xx Preview 6",
// ".NET 7 SDK 7.0.1xx Internal",
new TargetChannelConfig(
2703,
false,
3038,
true,
PublishingInfraVersion.All,
new List<string>() { "7.0.1xx-preview6", "7.0-preview6" },
DotNet7Feeds,
PublicAndInternalSymbolTargets,
new List<string>() { "internal/7.0.1xx", "internal/7.0" },
DotNet7InternalFeeds,
InternalSymbolTargets,
filenamesToExclude: FilenamesToExclude),

// ".NET 7 Preview 7",
Expand All @@ -342,44 +333,44 @@ public enum BuildQuality
PublicAndInternalSymbolTargets,
filenamesToExclude: FilenamesToExclude),

// ".NET 7 RC 1",
// ".NET 7 RC 1 Internal",
new TargetChannelConfig(
2844,
false,
3033,
true,
PublishingInfraVersion.All,
new List<string>() { "7.0-rc1" },
DotNet7Feeds,
PublicAndInternalSymbolTargets,
new List<string>() { "internal/7.0-rc1" },
DotNet7InternalFeeds,
InternalSymbolTargets,
filenamesToExclude: FilenamesToExclude),

// ".NET 7 SDK 7.0.1xx RC 1",
// ".NET 7 SDK 7.0.1xx RC 1 Internal",
new TargetChannelConfig(
2841,
false,
3036,
true,
PublishingInfraVersion.All,
new List<string>() { "7.0.1xx-rc1", "7.0-rc1" },
DotNet7Feeds,
PublicAndInternalSymbolTargets,
new List<string>() { "internal/7.0.1xx-rc1", "internal/7.0-rc1" },
DotNet7InternalFeeds,
InternalSymbolTargets,
filenamesToExclude: FilenamesToExclude),

// ".NET 7 RC 2",
// ".NET 7 RC 2 Internal",
new TargetChannelConfig(
2845,
false,
3034,
true,
PublishingInfraVersion.All,
new List<string>() { "7.0-rc2" },
DotNet7Feeds,
PublicAndInternalSymbolTargets,
new List<string>() { "internal/7.0-rc2" },
DotNet7InternalFeeds,
InternalSymbolTargets,
filenamesToExclude: FilenamesToExclude),

// ".NET 7 SDK 7.0.1xx RC 2",
// ".NET 7 SDK 7.0.1xx RC 2 Internal",
new TargetChannelConfig(
2842,
false,
3037,
true,
PublishingInfraVersion.All,
new List<string>() { "7.0.1xx-rc2", "7.0-rc2" },
DotNet7Feeds,
PublicAndInternalSymbolTargets,
new List<string>() { "internal/7.0.1xx-rc2", "internal/7.0-rc2" },
DotNet7InternalFeeds,
InternalSymbolTargets,
filenamesToExclude: FilenamesToExclude),

// ".NET 6",
Expand Down