Creating and publishing 'symbols.nuget' to the blob feed. (#8712)

* Creating and publishing '*.symbols.nuget' to the blob feed.

* Reverting 'generatenupkg' methodology.

* Fixing formatting...

* Overwrite should = 'false'

* Second draft - Creating and publishing '*.symbols.nuget' to the blob feed.

* Fixing a VS auto-update.

* Removing the 'Microsoft.SymbolUploader.Build.Task' modifications; need to make a PR just for this.

* Change "sdk.*.Microsoft.DotNet.SDK.*.symbols.nupkg" to "runtime.*.Microsoft.DotNet.SDK.*.symbols.nupkg"; removing the 'DotNetRestore' on the Symbols.csproj

* Removing a 'todo' comment...

* Putting back the 'dotnet restore'

* Fixing a typo...

* Logical separation of the 'nupkg' from the 'symbols.nupkg' enumeration; fixed 'swr' pattern.

* Add "BLOBFEED_STORAGE_CONTAINER"
This commit is contained in:
John Beisner 2018-03-13 08:19:15 -07:00 committed by GitHub
parent bcc48613fb
commit dbcd83075c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 110 additions and 42 deletions

View file

@ -35,8 +35,10 @@
<ChecksumCloudDropURL Condition="'$(ChecksumCloudDropURL)' == ''">https://$(ChecksumCloudDropAccountName).blob.core.windows.net/$(ChecksumContainerName)/index.json</ChecksumCloudDropURL>
<!-- Values related to the upload of NuPkgs to the blob feed -->
<BlobFeedContainerName>$(BLOBFEED_STORAGE_CONTAINER)</BlobFeedContainerName>
<BlobFeedContainerName Condition="'$(BlobFeedContainerName)' == ''">dotnet-core</BlobFeedContainerName>
<BlobFeedExpectedURL>$(PB_PublishBlobFeedUrl)</BlobFeedExpectedURL>
<BlobFeedExpectedURL Condition="'$(BlobFeedExpectedURL)' == ''">https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json</BlobFeedExpectedURL>
<BlobFeedExpectedURL Condition="'$(BlobFeedExpectedURL)' == ''">https://dotnetfeed.blob.core.windows.net/$(BlobFeedContainerName)/index.json</BlobFeedExpectedURL>
<BlobFeedCloudDropAccessToken>$(PB_PublishBlobFeedKey)</BlobFeedCloudDropAccessToken>
<BlobFeedCloudDropAccessToken Condition="'$(BlobFeedCloudDropAccessToken)' == ''">$(BLOBFEED_STORAGE_KEY)</BlobFeedCloudDropAccessToken>
</PropertyGroup>

View file

@ -27,14 +27,11 @@
<HostMonikerRidForFileName Condition=" '$(IsDebianBaseDistro)' == 'true' ">$(Architecture)</HostMonikerRidForFileName>
<ArtifactNameSdk>dotnet-sdk-internal</ArtifactNameSdk>
<ArtifactNameSdkSymbols>dotnet-sdk-symbols</ArtifactNameSdkSymbols>
<ArtifactNameCombinedHostHostFxrFrameworkSdk>dotnet-sdk</ArtifactNameCombinedHostHostFxrFrameworkSdk>
<ArtifactNameSdkLanguagePack>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-langpack</ArtifactNameSdkLanguagePack>
<ArtifactNameWithVersionSdk>$(ArtifactNameSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdk>
<ArtifactNameWithVersionMSBuildExtensions>dotnet-standard-support-vs2015-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionMSBuildExtensions>
<ArtifactNameWithVersionSdkSymbols>$(ArtifactNameSdkSymbols)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdkSymbols>
<ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk>
<ArtifactNameWithVersionSdkLanguagePack>$(ArtifactNameSdkLanguagePack)-$(SdkVersion)-$(ProductMonikerRid)</ArtifactNameWithVersionSdkLanguagePack>
<DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)-$(SdkVersion)-</DistroSpecificArtifactNameWithVersionCombinedHostHostFxrFrameworkSdkWithoutHostMonikerRid>

View file

@ -22,7 +22,6 @@
<add key="templating" value="https://dotnet.myget.org/F/templating/api/v3/index.json" />
<add key="aspnetcore-release" value="https://dotnet.myget.org/F/aspnetcore-release/api/v3/index.json" />
<add key="websdkfeed" value="https://dotnet.myget.org/F/dotnet-web/api/v3/index.json" />
<add key="cli-deps" value="https://dotnet.myget.org/F/cli-deps/api/v3/index.json" />
<add key="roslyn" value="https://dotnet.myget.org/f/roslyn/api/v3/index.json" />
<add key="symreader-native" value="https://dotnet.myget.org/f/symreader-native/api/v3/index.json" />
<add key="xunit" value="https://www.myget.org/F/xunit/api/v3/index.json" />

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Layout" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)/package/Layout.targets" />
<Import Project="$(MSBuildThisFileDirectory)/package/Symbols.targets" />
<Import Project="$(MSBuildThisFileDirectory)/package/Archive.targets" />
<Import Project="$(MSBuildThisFileDirectory)/package/Nupkg.targets" />
<Import Project="$(MSBuildThisFileDirectory)/package/Installer.DEB.proj" />
@ -18,6 +19,7 @@
Init;
Layout;
GenerateNugetPackages;
GenerateSymbolsNugetPackages;
GenerateArchives;
GenerateInstallers" />

View file

@ -43,12 +43,17 @@
Condition=" '$(PublishNativeInstallers)' == 'true' "/>
<ForPublishing Include="%(GenerateArchivesInputsOutputs.Outputs)"
Condition=" '$(PublishArchives)' == 'true' "/>
<ForPublishing Include="$(PackagesDirectory)/Microsoft*.nupkg"
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "/>
<ForPublishing Include="$(PackagesDirectory)/Microsoft.DotNet.Cli.Utils.*.nupkg"
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' " />
<ForPublishing Include="$(PackagesDirectory)/Microsoft.DotNet.MSBuildSdkResolver.*.nupkg"
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' " />
<ForPublishing Include="$(PackagesDirectory)/runtime.*.Microsoft.DotNet.SDK.*.symbols.nupkg" />
<ForPublishing Include="$(PackagesDirectory)/VS.Redist.Common.Net.Core.SDK.$(Architecture).*.nupkg"
Condition=" '$(OS)' == 'Windows_NT' "/>
<ForPublishing Include="$(PackagesDirectory)/VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.*.nupkg"
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "/>
<ForPublishing Include="$(PackagesDirectory)/VS.Redist.Common.Net.Core.SDK.MSBuildExtensions.swr"
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "/>
</ItemGroup>
<ItemGroup>

View file

@ -174,7 +174,7 @@
<Target Name="GenerateSdkMSBuildExtensionsNupkg"
DependsOnTargets="Init;Layout;MsiTargetsSetupInputOutputs;GenerateSdkBundle"
Condition=" '$(OS)' == 'Windows_NT'"
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' "
Inputs="$(MSBuildExtensionsLayoutDirectory)/**/*;
$(SdkInstallerNuspecFile);
$(SdkGenerateNupkgPowershellScript)"

View file

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SdkSymbolsLayoutOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkSymbols)</SdkSymbolsLayoutOutputDirectory>
<CombinedHostHostFxrFrameworkSdkOutputDirectory>$(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</CombinedHostHostFxrFrameworkSdkOutputDirectory>
<SdkLanguagePackOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkLanguagePack)</SdkLanguagePackOutputDirectory>
<SatelliteAssemblies>*.resources.dll</SatelliteAssemblies>
@ -12,7 +11,6 @@
<!-- Set up Items with Layout Input Files -->
<ItemGroup>
<SdkLayoutInput Include="$(OutputDirectory)/sdk/**/*" />
<SdkSymbolsLayoutInput Include="$(SymbolsDirectory)/sdk/**/*" />
<CombinedHostHostFxrFrameworkSdkInput Include="$(OutputDirectory)/**/*" />
<SdkLanguagePackInput Include="$(OutputDirectory)/sdk/**/$(SatelliteAssemblies)" />
@ -29,12 +27,6 @@
Path2="%(SdkLayoutInput.Identity)" >
<Output TaskParameter="RelativePath" ItemName="SdkRelativeOutputFiles" />
</MakeRelative>
<MakeRelative
Condition="'$(SeparateSymbolsArchive)' != 'false'"
Path1="$(SymbolsDirectory)/"
Path2="%(SdkSymbolsLayoutInput.Identity)" >
<Output TaskParameter="RelativePath" ItemName="SdkSymbolsRelativeOutputFiles" />
</MakeRelative>
<MakeRelative
Path1="$(OutputDirectory)/"
Path2="%(CombinedHostHostFxrFrameworkSdkInput.Identity)" >
@ -71,13 +63,6 @@
<Name>$(ArtifactNameSdk)</Name>
</LayoutDefinition>
<LayoutDefinition Include="SdkSymbols" Condition="'$(SeparateSymbolsArchive)' != 'false'">
<InputFiles>@(SdkSymbolsLayoutInput)</InputFiles>
<OutputFiles>@(SdkSymbolsRelativeOutputFiles -> '$(SdkSymbolsLayoutOutputDirectory)/%(Identity)')</OutputFiles>
<NameWithVersion>$(ArtifactNameWithVersionSdkSymbols)</NameWithVersion>
<Name>$(ArtifactNameSdkSymbols)</Name>
</LayoutDefinition>
<LayoutDefinition Include="CombinedHostHostFxrFrameworkSdk">
<InputFiles>@(CombinedHostHostFxrFrameworkSdkInput)</InputFiles>
<OutputFiles>@(CombinedHostHostFxrFrameworkSdkRelativeOutputFiles -> '$(CombinedHostHostFxrFrameworkSdkOutputDirectory)/%(Identity)')</OutputFiles>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Layout" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PackagingBuildBasePath>$(CompilationDirectory)/forPackaging</PackagingBuildBasePath>
</PropertyGroup>
@ -10,10 +10,12 @@
<ProjectsToPack Include="$(SrcDirectory)/Microsoft.DotNet.Cli.Utils" >
<ProjectName>Microsoft.DotNet.Cli.Utils</ProjectName>
<Version>$(SdkNugetVersion)</Version>
<IncludeSymbols>False</IncludeSymbols>
</ProjectsToPack>
<ProjectsToPack Include="$(SrcDirectory)/Microsoft.DotNet.MSBuildSdkResolver" >
<ProjectName>Microsoft.DotNet.MSBuildSdkResolver</ProjectName>
<Version>$(SdkNugetVersion)</Version>
<IncludeSymbols>True</IncludeSymbols>
</ProjectsToPack>
</ItemGroup>
</Target>
@ -22,6 +24,7 @@
DependsOnTargets="Init; SetupProjectsToPack">
<DotNetPack NoBuild="True"
IncludeSymbols="%(ProjectsToPack.IncludeSymbols)"
Output="$(PackagesDirectory)"
ProjectPath="%(ProjectsToPack.Identity)/%(ProjectsToPack.ProjectName).csproj"
ToolPath="$(PreviousStageDirectory)"

View file

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildThisFileDirectory)/Symbols.targets" />
<PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework>
<EnableDefaultItems>false</EnableDefaultItems>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<IncludeBuildOutput>false</IncludeBuildOutput>
<PackageId>$(SymbolsNupkgPackageId)</PackageId>
<PackageVersion>$(SdkVersion)</PackageVersion>
</PropertyGroup>
<ItemGroup>
<Content Include="$(SymbolsDirectory)\**\*.*" Pack="true" PackagePath="%(RecursiveDir)%(Filename)%(Extension)"/>
</ItemGroup>
</Project>

View file

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SymbolsProjectFileName>$(MSBuildThisFileDirectory)/Symbols.csproj</SymbolsProjectFileName>
<SymbolsNupkgPackageId>runtime.$(ProductMonikerRid).Microsoft.DotNet.SDK</SymbolsNupkgPackageId>
</PropertyGroup>
<Target Name="GenerateSymbolsNugetPackages"
DependsOnTargets="RestoreSymbolsProject;GenerateSymbolsNuget">
</Target>
<Target Name="GenerateSymbolsNuget"
DependsOnTargets="RestoreSymbolsProject">
<DotNetPack NoBuild="True"
IncludeSymbols="False"
Output="$(PackagesDirectory)"
ProjectPath="&quot;$(SymbolsProjectFileName)&quot;"
ToolPath="$(PreviousStageDirectory)" />
<Move SourceFiles="$(PackagesDirectory)\$(SymbolsNupkgPackageId).$(SdkVersion).nupkg" DestinationFiles="$(PackagesDirectory)\$(SymbolsNupkgPackageId).$(SdkVersion).symbols.nupkg" />
</Target>
<Target Name="RestoreSymbolsProject"
DependsOnTargets="Init; SetupProjectsToPack">
<DotNetRestore ProjectPath="&quot;$(SymbolsProjectFileName)&quot;"
ToolPath="$(PreviousStageDirectory)" />
</Target>
</Project>

View file

@ -1,27 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="GatherNupkgsForPublishing">
<ItemGroup>
<NupkgsForPublishing Include="$(PackagesDirectory)/Microsoft.DotNet.Cli.Utils.*.nupkg" />
<NupkgsForPublishing Include="$(PackagesDirectory)/Microsoft.DotNet.MSBuildSdkResolver.*.nupkg">
<NupkgsForPublishing Include="$(PackagesDirectory)/Microsoft.DotNet.Cli.Utils.*.nupkg"
Exclude="$(PackagesDirectory)/*.symbols.nupkg"
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' " />
<NupkgsForPublishing Include="$(PackagesDirectory)/Microsoft.DotNet.MSBuildSdkResolver.*.nupkg"
Exclude="$(PackagesDirectory)/*.symbols.nupkg"
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' " >
<ManifestArtifactData>NonShipping=true</ManifestArtifactData>
</NupkgsForPublishing>
</ItemGroup>
<Target Name="PublishNupkgToBlobFeed" Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' " >
<ItemGroup>
<SymbolsNupkgsForPublishing Include="$(PackagesDirectory)/Microsoft.DotNet.MSBuildSdkResolver.*.symbols.nupkg"
Condition=" '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' " />
<SymbolsNupkgsForPublishing Include="$(PackagesDirectory)/runtime.*.Microsoft.DotNet.SDK.*.symbols.nupkg" />
</ItemGroup>
<ItemGroup>
<AllNupkgsForPublishing Include="@(SymbolsNupkgsForPublishing);@(NupkgsForPublishing)" />
</ItemGroup>
</Target>
<Target Name="PublishNupkgToBlobFeed" DependsOnTargets="GatherNupkgsForPublishing">
<Error Condition="'$(BlobFeedCloudDropAccessToken)' == ''" Text="Missing property BlobFeedCloudDropAccessToken." />
<Error Condition="'$(BlobFeedExpectedURL)' == ''" Text="Missing property BlobFeedExpectedURL." />
<Message Text="Publish NuPkgs to Blob feed started: $(BlobFeedExpectedURL)" />
<PushToBlobFeed ExpectedFeedUrl="$(BlobFeedExpectedURL)"
AccountKey="$(BlobFeedCloudDropAccessToken)"
ItemsToPush="@(NupkgsForPublishing)"
ItemsToPush="@(AllNupkgsForPublishing)"
ManifestBranch="$(BranchName)"
ManifestBuildId="$(FullNugetVersion)"
ManifestCommit="$(CommitHash)"
ManifestName="$(BuildName)"
ManifestBuildData="ProductVersion=$(FullNugetVersion)"
Overwrite="true"
Overwrite="false"
PublishFlatContainer="false"
SkipCreateManifest="$(IsNotOrchestratedPublish)" />
</Target>

View file

@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
protected override string Args
{
get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {MsbuildArgs}"; }
get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {GetIncludeSymbols()} {MsbuildArgs}"; }
}
public string Configuration { get; set; }
@ -29,6 +29,8 @@ namespace Microsoft.DotNet.Cli.Build
public string Runtime { get; set; }
public bool IncludeSymbols { get; set; }
private string GetConfiguration()
{
if (!string.IsNullOrEmpty(Configuration))
@ -88,5 +90,16 @@ namespace Microsoft.DotNet.Cli.Build
return null;
}
private string GetIncludeSymbols()
{
if (IncludeSymbols)
{
return $"--include-symbols";
}
return null;
}
}
}

View file

@ -128,6 +128,7 @@ docker run $INTERACTIVE -t --rm --sig-proxy=true \
-e ARTIFACT_STORAGE_CONTAINER \
-e CHECKSUM_STORAGE_ACCOUNT \
-e CHECKSUM_STORAGE_CONTAINER \
-e BLOBFEED_STORAGE_CONTAINER \
-e CLIBUILD_SKIP_TESTS \
-e COMMITCOUNT \
-e DROPSUFFIX \

View file

@ -2,7 +2,7 @@
<PropertyGroup>
<Description>Abstractions for making code that uses file system and environment testable.</Description>
<VersionPrefix>2.0.0-beta</VersionPrefix>
<Version>$(SdkVersion)</Version>
<TargetFramework>netstandard1.3</TargetFramework>
<WarningsAsErrors>true</WarningsAsErrors>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

View file

@ -315,8 +315,7 @@
</Target>
<Target Name="SeparateSymbolsFromPublishDir"
AfterTargets="CrossgenPublishDir"
Condition="'$(SeparateSymbolsArchive)' != 'false'">
AfterTargets="CrossgenPublishDir">
<ItemGroup>
<PdbsToMove Include="$(PublishDir)/**/*.pdb" />
<PdbsToMove Include="$(PublishDir)/**/*.ni.*.map" />