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

Port change from https://github.com/dotnet/core-setup/pull/8426 #768

Merged
merged 3 commits into from
May 13, 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
1 change: 0 additions & 1 deletion Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@

<NuGetVersion>$(SharedFrameworkNugetVersion)</NuGetVersion>

<BinariesRelativePath>WindowsDesktop/$(SharedFrameworkNugetVersion)/</BinariesRelativePath>
<InstallersRelativePath>WindowsDesktop/$(SharedFrameworkNugetVersion)/</InstallersRelativePath>
</PropertyGroup>

Expand Down
17 changes: 2 additions & 15 deletions eng/stages/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,19 @@ parameters:

stages:

# Create extra stage per BAR channel that needs extra publish steps.
- ${{ each dependency in parameters.dependsOnPublishStages }}:
- stage: PublishBlob_${{ dependency.dependsOn }}
displayName: '${{ dependency.channel.name }} Blob Publish'
dependsOn: PrepareForPublish
variables:
- template: /eng/common/templates/post-build/common-variables.yml
jobs:
- template: /eng/jobs/run-publish-project.yml
parameters:
projectName: publish-blobs
dependency: ${{ dependency }}

# Stages-based publishing entry point
- template: /eng/common/templates/post-build/post-build.yml
parameters:
validateDependsOn:
- ${{ each dependency in parameters.dependsOnPublishStages }}:
- PublishBlob_${{ dependency.dependsOn }}
- PrepareForPublish
# Symbol validation is not ready yet. https://github.com/dotnet/arcade/issues/2871
enableSymbolValidation: false
# SourceLink validation doesn't work in dev builds: tries to pull from GitHub. https://github.com/dotnet/arcade/issues/3604
enableSourceLinkValidation: false
# Allow symbol publish to emit expected warnings without failing the build. Include single
# quotes inside the string so that it passes through to MSBuild without script interference.
symbolPublishingAdditionalParameters: "'-warnAsError:$false'"
publishInstallersAndChecksums: true

# Create extra stage per BAR channel that needs extra publish steps. These run after the Arcade
# stages because they depend on Arcade's NuGet package publish being complete.
Expand Down
37 changes: 32 additions & 5 deletions publish/prepare-artifacts.proj
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />

<UsingTask TaskName="GenerateChecksums" AssemblyFile="$(LocalBuildToolsTaskFile)" />

<PropertyGroup>
<SuppressFinalPackageVersion>true</SuppressFinalPackageVersion>
</PropertyGroup>

<Target Name="CreateChecksums">
<ItemGroup>
<ArtifactsForGeneratingChecksums
Include="@(UploadToBlobStorageFile)"
DestinationPath="%(FullPath)$(ChecksumExtension)" />

<GeneratedChecksumFile Include="@(ArtifactsForGeneratingChecksums -> '%(DestinationPath)')" />
</ItemGroup>

<GenerateChecksums Items="@(ArtifactsForGeneratingChecksums)" />
</Target>

<Target Name="SignPackages"
Condition="'$(SkipSigning)' != 'true' and '$(SignType)' != 'public'">
<Message Importance="High" Text="Signing final packages" />
Expand All @@ -13,12 +31,17 @@
<Target Name="UploadPreparedArtifactsToPipeline"
DependsOnTargets="
FindDownloadedArtifacts;
SignPackages">
SignPackages;
CreateChecksums">
<PropertyGroup>
<PreparedFileUploadDir>$(ArtifactsObjDir)PreparedFileUpload\</PreparedFileUploadDir>
</PropertyGroup>

<Copy SourceFiles="@(UploadToBlobStorageFile)" DestinationFolder="$(PreparedFileUploadDir)">
<ItemGroup>
<AllFilesToBlobStorage Include="@(UploadToBlobStorageFile);@(UploadToBlobStorageFile)" />
</ItemGroup>

<Copy SourceFiles="@(AllFilesToBlobStorage)" DestinationFolder="$(PreparedFileUploadDir)">
<Output TaskParameter="CopiedFiles" ItemName="CopiedUploadToBlobStorageFile" />
</Copy>

Expand Down Expand Up @@ -96,9 +119,13 @@

<ItemsToPush
Include="@(UploadToBlobStorageFile)"
Exclude="@(NupkgToPublishFile);@(SymbolNupkgToPublishFile)" />
<ItemsToPush>
<RelativeBlobPath>assets/windowsdesktop/$(InstallersRelativePath)%(Filename)%(Extension)</RelativeBlobPath>
Exclude="@(NupkgToPublishFile);@(SymbolNupkgToPublishFile)">
<RelativeBlobPath>$(InstallersRelativePath)%(Filename)%(Extension)</RelativeBlobPath>
</ItemsToPush>

<ItemsToPush Include="@(GeneratedChecksumFile)">
<RelativeBlobPath>$(InstallersRelativePath)%(Filename)%(Extension)</RelativeBlobPath>
<Category>Checksum</Category>
</ItemsToPush>
</ItemGroup>

Expand Down
75 changes: 0 additions & 75 deletions publish/publish-blobs.proj

This file was deleted.