Finalize checksums
authorKarthik Rajasekaran <karajas@microsoft.com>
Mon, 22 May 2017 18:03:01 +0000 (11:03 -0700)
committerKarthik Rajasekaran <karajas@microsoft.com>
Mon, 22 May 2017 18:13:12 +0000 (11:13 -0700)
Fix Finalization of UniversalWindowsPlatform packages

Add checksum parameters to publish

Commit migrated from https://github.com/dotnet/core-setup/commit/a24212bc5832fe883eb05a1627a63fa1bcd3276c

src/installer/buildpipeline/Core-Setup-Publish.json
src/installer/pkg/projects/Microsoft.NETCore.UniversalWindowsPlatform/Microsoft.NETCore.UniversalWindowsPlatform.pkgproj
src/installer/publish/publish.proj
tools-local/tasks/FinalizeBuild.cs

index 2601741..0727b5c 100644 (file)
         "solution": "$(PB_SourcesDirectory)\\publish\\publish.proj",
         "platform": "$(PB_TargetArchitecture)",
         "configuration": "$(BuildConfiguration)",
-        "msbuildArguments": "/p:Configuration=$(BuildConfiguration) $(PB_CommonMSBuildArgs) /p:NuGetFeedUrl=$(NUGET_FEED_URL) /p:NuGetSymbolsFeedUrl=$(NUGET_SYMBOLS_FEED_URL) /p:NuGetApiKey=$(NUGET_API_KEY) /p:AzureAccountName=$(PB_AzureAccountName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:GitHubUser=$(PB_GitHubUser) /p:GitHubEmail=$(PB_GitHubEmail) /p:GitHubAuthToken=$(GITHUB_PASSWORD) /p:VersionsRepoOwner=$(PB_VersionsRepoOwner) /p:VersionsRepo=$(PB_VersionsRepo) /p:VersionsRepoPath=build-info/dotnet/$(PB_RepoName)/$(SourceBranch) /p:Finalize=true /flp:v=detailed;LogFile=$(PB_SourcesDirectory)\\publish.log",
+        "msbuildArguments": "/p:Configuration=$(BuildConfiguration) $(PB_CommonMSBuildArgs) /p:NuGetFeedUrl=$(NUGET_FEED_URL) /p:NuGetSymbolsFeedUrl=$(NUGET_SYMBOLS_FEED_URL) /p:NuGetApiKey=$(NUGET_API_KEY) /p:AzureAccountName=$(PB_AzureAccountName) /p:AzureAccessToken=$(PB_AzureAccessToken) /p:ChecksumAzureAccountName=$(PB_ChecksumAzureAccountName) /p:ChecksumAzureAccessToken=$(PB_ChecksumAzureAccessToken) /p:GitHubUser=$(PB_GitHubUser) /p:GitHubEmail=$(PB_GitHubEmail) /p:GitHubAuthToken=$(GITHUB_PASSWORD) /p:VersionsRepoOwner=$(PB_VersionsRepoOwner) /p:VersionsRepo=$(PB_VersionsRepo) /p:VersionsRepoPath=build-info/dotnet/$(PB_RepoName)/$(SourceBranch) /p:Finalize=true /flp:v=detailed;LogFile=$(PB_SourcesDirectory)\\publish.log",
         "clean": "false",
         "maximumCpuCount": "false",
         "restoreNugetPackages": "false",
       "value": null,
       "isSecret": true
     },
+    "PB_ChecksumAzureAccountName": {
+      "value": "dotnetclichecksums"
+    },
+    "PB_ChecksumAzureAccessToken": {
+      "value": null,
+      "isSecret": true
+    },
     "PB_VsoAccountName": {
       "value": "dn-bot"
     },
index f3dc1bd..74e8e26 100644 (file)
@@ -3,7 +3,7 @@
   <Import Project="dir.props" />
 
   <PropertyGroup>
-    <Version>5.4.0</Version>
+    <Version>$(UWPCoreRuntimeSdkVersion)</Version>
     <OmitDependencies>true</OmitDependencies>
     <SkipValidatePackage>true</SkipValidatePackage>
     <ShouldCreateLayout>false</ShouldCreateLayout>
index 3cc9faf..268920b 100644 (file)
                    Channel="$(Channel)"
                    Version="$(SharedFrameworkNugetVersion)"
                    SharedFrameworkNugetVersion="$(SharedFrameworkNugetVersion)"
+                   UWPCoreRuntimeSdkFullVersion="$(UWPCoreRuntimeSdkFullVersion)"
                    SharedHostNuGetVersion="$(HostVersion)"
                    ProductVersion="$(ProductVersion)"
                    CommitHash="$(LatestCommit)"
                    FinalizeContainer="Runtime/$(SharedFrameworkNugetVersion)"
                    ForcePublish="true"                  
                    Condition="'@(_MissingBlobNames)' == ''" />
+    <Error Condition="'$(ChecksumAzureAccessToken)' == ''" Text="Missing required property 'ChecksumAzureAccessToken'" />
+    <Error Condition="'$(ChecksumAzureAccountName)' == ''" Text="Missing required property 'ChecksumAzureAccountName'" />
+    <Error Condition="'$(ChecksumContainerName)' == ''" Text="Missing required property 'ChecksumContainerName'" />
+    <Message Importance="High" Text="Finalizing Checksums" />
+    <FinalizeBuild AccountName="$(ChecksumAzureAccountName)"
+                   AccountKey="$(ChecksumAzureAccessToken)"
+                   ContainerName="$(ChecksumContainerName)"
+                   SemaphoreBlob="Runtime/$(Channel)/checksumPublishSemaphore"
+                   Channel="$(Channel)"
+                   Version="$(SharedFrameworkNugetVersion)"
+                   SharedFrameworkNugetVersion="$(SharedFrameworkNugetVersion)"
+                   UWPCoreRuntimeSdkFullVersion="$(UWPCoreRuntimeSdkFullVersion)"
+                   SharedHostNuGetVersion="$(HostVersion)"
+                   ProductVersion="$(ProductVersion)"
+                   CommitHash="$(LatestCommit)"
+                   FinalizeContainer="Runtime/$(SharedFrameworkNugetVersion)"
+                   ForcePublish="true" />
   </Target>
 
   <Target Name="PublishCoreHostPackagesToFeed"
index 63db705..fac14b2 100644 (file)
@@ -35,6 +35,8 @@ namespace Microsoft.DotNet.Build.Tasks
         [Required]
         public string SharedHostNugetVersion { get; set; }
         [Required]
+        public string UWPCoreRuntimeSdkFullVersion { get; set; }
+        [Required]
         public string ProductVersion { get; set; }
         [Required]
         public string Version { get; set; }
@@ -122,7 +124,8 @@ namespace Microsoft.DotNet.Build.Tasks
             {
                 string targetName = Path.GetFileName(blob)
                                         .Replace(SharedFrameworkNugetVersion, "latest")
-                                        .Replace(SharedHostNugetVersion, "latest");
+                                        .Replace(SharedHostNugetVersion, "latest")
+                                        .Replace(UWPCoreRuntimeSdkFullVersion, "latest");
                 string sourceBlob = blob.Replace($"/{ContainerName}/", "");
                 string destinationBlob = $"{destinationFolder}{targetName}";
                 Log.LogMessage($"Copying blob '{sourceBlob}' to '{destinationBlob}'");