Skip to content

Attempt to auto-publish vs.redist packages to orchestrated feed #20211

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

Merged
merged 13 commits into from
Apr 1, 2020
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
11 changes: 10 additions & 1 deletion build/Publish.targets
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@
<InstallerAliasBaseFileName>aspnetcore-runtime-latest</InstallerAliasBaseFileName>
<IntermediateInstallerBaseFileName>aspnetcore-runtime-internal-$(PackageVersion)</IntermediateInstallerBaseFileName>
<WindowsHostingBundleInstallerFileName>dotnet-hosting-$(PackageVersion)-win.exe</WindowsHostingBundleInstallerFileName>
<!-- This matches the property set in SharedFramework.wixproj -->
<SharedFrameworkRedistPackageId>VS.Redist.Common.AspNetCore.SharedFramework</SharedFrameworkRedistPackageId>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -174,6 +176,10 @@
<PackageToPublish Include="%(_SymbolsPackageArtifactInfo.ArtifactPath)" Category="symbols" IsSymbolsPackage="true" />
</ItemGroup>

<ItemGroup>
<RedistPackageToPublish Include="$(DependencyAssetsDir)$(SharedFrameworkRedistPackageId)*" />
</ItemGroup>

<ItemGroup>
<_MissingArtifactFile Include="@(FilesToPublish)" Condition="!Exists(%(FilesToPublish.Identity))" />
<_MissingArtifactFile Include="@(NpmPackageToPublish)" Condition="!Exists(%(NpmPackageToPublish.Identity))" />
Expand Down Expand Up @@ -276,6 +282,10 @@
ManifestArtifactData="NonShipping=true"
Condition="'%(PackageToPublish.Category)' != 'ship'" />

<PackageToPublishToTransport
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PublishToTransportFeed is the target that runs when we're trying to publish to the orchestrated feed, so as long as I also update https://devdiv.visualstudio.com/DevDiv/_git/DotNet-Orchestration-Utilities?path=%2Fsrc%2FFinal.VSFeedPublish.targets&version=GBmaster, the orchestration should take care of copying the redist packages from the orchestrated feed to the VS feed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option would be to include these packages in @(FilesToPublish) i.e. changing the input GetFilesToPublish target. That has the advantage of placing the files in the \aspnetci drop too.

Include="@(RedistPackageToPublish)"
ManifestArtifactData="NonShipping=true" />

<FilesToPublishToTransport Include="@(NpmPackageToPublish)"
RelativeBlobPath="$(BlobFileRelativePathBase)%(NpmPackageToPublish.RelativeBlobPath)"
ManifestArtifactData="%(NpmPackageToPublish.ManifestArtifactData)" />
Expand All @@ -287,7 +297,6 @@
Condition=" '%(FilesToPublish.IsDuplicateUpload)' != 'true' " />
</ItemGroup>


<PushToBlobFeed ExpectedFeedUrl="$(PublishBlobFeedUrl)"
AccountKey="$(PublishBlobFeedKey)"
ItemsToPush="@(PackageToPublishToTransport)"
Expand Down
5 changes: 3 additions & 2 deletions src/Installers/Windows/GenerateNugetPackageWithMsi.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ param(
[Parameter(Mandatory=$true)][string]$PackageVersion,
[Parameter(Mandatory=$true)][string]$RepoRoot,
[Parameter(Mandatory=$true)][string]$MajorVersion,
[Parameter(Mandatory=$true)][string]$MinorVersion
[Parameter(Mandatory=$true)][string]$MinorVersion,
[Parameter(Mandatory=$true)][string]$PackageId
)

$NuGetDir = Join-Path $RepoRoot "obj\Tools\nuget\$Name\$Architecture"
Expand All @@ -27,5 +28,5 @@ if (-not (Test-Path $NuGetExe)) {
wget https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe -OutFile $NuGetExe
}

& $NuGetExe pack $NuspecFile -Version $PackageVersion -OutputDirectory $OutputDirectory -NoDefaultExcludes -NoPackageAnalysis -Properties ASPNETCORE_RUNTIME_MSI=$MsiPath`;ASPNETCORE_CAB_FILE=$CabPath`;ARCH=$Architecture`;MAJOR=$MajorVersion`;MINOR=$MinorVersion`;
& $NuGetExe pack $NuspecFile -Version $PackageVersion -OutputDirectory $OutputDirectory -NoDefaultExcludes -NoPackageAnalysis -Properties ASPNETCORE_RUNTIME_MSI=$MsiPath`;ASPNETCORE_CAB_FILE=$CabPath`;ARCH=$Architecture`;MAJOR=$MajorVersion`;MINOR=$MinorVersion`;ID=$PackageId`;
Exit $LastExitCode
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<NamespaceGuid>$(SharedFrameworkNamespaceGuid)</NamespaceGuid>
<ToolsetInstallerNuspecFile>$(RepositoryRoot)\src\Installers\Windows\SharedFramework\SharedFrameworkPackage.nuspec</ToolsetInstallerNuspecFile>
<InstallersOutputPath>$(RepositoryRoot)artifacts/bin/$(Configuration)/installers/</InstallersOutputPath>
<SharedFrameworkRedistPackageId>VS.Redist.Common.AspNetCore.SharedFramework</SharedFrameworkRedistPackageId>
<!-- Use non-stable versioning for this package, but keep the stable version in OutputName above -->
<PackageVersion>$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -64,7 +67,8 @@
'$(PackageVersion)' ^
'$(RepositoryRoot)' ^
'$(AspNetCoreMajorVersion)' ^
'$(AspNetCoreMinorVersion)'" />
'$(AspNetCoreMinorVersion)' ^
'$(SharedFrameworkRedistPackageId)'" />
</Target>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>VS.Redist.Common.AspNetCore.SharedFramework.$ARCH$.$MAJOR$.$MINOR$</id>
<id>$ID$.$ARCH$.$MAJOR$.$MINOR$</id>
<version>1.0.0</version>
<title>VS.Redist.Common.AspNetCore.SharedFramework.$ARCH$.$MAJOR$.$MINOR$</title>
<title>$ID$.$ARCH$.$MAJOR$.$MINOR$</title>
<authors>Microsoft</authors>
<owners>Microsoft</owners>
<licenseUrl>https://www.microsoft.com/net/dotnet_library_license.htm</licenseUrl>
Expand Down