diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index b4ab49da9c6..24e51edfe55 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -497,7 +497,7 @@ extends: timeoutInMinutes: 120 # Check - "Xamarin.Android (Prepare .NET Release Convert NuGet to MSI)" - - template: nuget-msi-convert/job/v3.yml@yaml-templates + - template: nuget-msi-convert/job/v4.yml@yaml-templates parameters: yamlResourceName: yaml-templates dependsOn: sign_net_mac_win @@ -506,7 +506,17 @@ extends: !*Darwin* propsArtifactName: $(NuGetArtifactName) signType: $(MicroBuildSignType) - use1ESTemplate: true + preConvertSteps: + - task: DownloadPipelineArtifact@2 + inputs: + artifactName: nuget-signed + artifactPatterns: | + *Darwin* + downloadPath: $(Build.StagingDirectory)\drop\nugets + - task: DownloadPipelineArtifact@2 + inputs: + artifactName: nuget-linux-signed + downloadPath: $(Build.StagingDirectory)\drop\nugets postConvertSteps: - task: DownloadPipelineArtifact@2 inputs: @@ -514,24 +524,24 @@ extends: downloadPath: $(Build.StagingDirectory)\sign-verify patterns: | **/SignVerifyIgnore.txt - - task: MicroBuildCodesignVerify@3 displayName: verify signed msi content inputs: TargetFolders: | $(Build.ArtifactStagingDirectory)\bin\manifests - $(Build.ArtifactStagingDirectory)\bin\manifests-multitarget + $(Build.ArtifactStagingDirectory)\bin\manifests-packs + $(Build.ArtifactStagingDirectory)\bin\msi-nupkgs ExcludeSNVerify: true ApprovalListPathForCerts: $(Build.StagingDirectory)\sign-verify\SignVerifyIgnore.txt - # Check - "Xamarin.Android (Prepare .NET Release Push Internal)" + # Check - "Xamarin.Android (Prepare .NET Release Publish symbols and Push to Maestro)" - job: push_signed_nugets - displayName: Push Internal + displayName: Publish symbols and Push to Maestro dependsOn: - nuget_convert - sign_net_linux condition: and(eq(dependencies.nuget_convert.result, 'Succeeded'), eq(dependencies.sign_net_linux.result, 'Succeeded')) - timeoutInMinutes: 60 + timeoutInMinutes: 90 pool: name: AzurePipelines-EO image: $(WindowsPoolImage1ESPT) @@ -541,67 +551,45 @@ extends: variables: - ${{ if eq(variables['MicroBuildSignType'], 'Real') }}: - group: Publish-Build-Assets + templateContext: + outputs: + - output: artifactsDrop + dropServiceURI: https://devdiv.artifacts.visualstudio.com/DefaultCollection + buildNumber: $(ReleaseDropPrefix)/symbols + dropMetadataContainerName: DropMetadata-$(Build.BuildId)-symbols-$(System.JobAttempt) + sourcePath: $(Build.StagingDirectory)\symbols + retentionDays: 120 + toLowerCase: false steps: - checkout: self clean: true submodules: recursive + # Download symbols to be published to the symbols artifact drop declared above - task: DownloadPipelineArtifact@2 inputs: - artifactName: nuget-signed - downloadPath: $(Build.StagingDirectory)\nuget-signed - - - task: DownloadPipelineArtifact@2 - inputs: - artifactName: nuget-linux-signed - downloadPath: $(Build.StagingDirectory)\nuget-signed + artifactName: $(WindowsToolchainPdbArtifactName) + downloadPath: $(Build.StagingDirectory)\symbols - task: DownloadPipelineArtifact@2 inputs: - artifactName: vs-msi-nugets - downloadPath: $(Build.StagingDirectory)\nuget-signed + artifactName: DropMetadata-$(Build.BuildId)-nugets-$(System.JobAttempt) + downloadPath: $(Build.StagingDirectory)\metadata + displayName: Download nugets drop metadata - - task: DownloadPipelineArtifact@2 + - powershell: | + $jsonContent = Get-Content -Path "$(Build.StagingDirectory)\metadata\VSTSDrop.json" -Raw | ConvertFrom-Json + $dropPrefix = $jsonContent.VstsDropBuildArtifact.VstsDropUrl -replace 'https://devdiv.artifacts.visualstudio.com/DefaultCollection/_apis/drop/drops/' -replace '/nugets' + Write-Host "##vso[task.setvariable variable=ReleaseDropPrefix]$dropPrefix" + displayName: Set variable ReleaseDropPrefix + + # Download nugets drop created by nuget-msi-convert/job/v4.yml and publish to maestro + - task: ms-vscs-artifact.build-tasks.artifactDropDownloadTask-1.artifactDropDownloadTask@1 + displayName: Download $(ReleaseDropPrefix)/nugets inputs: - artifactName: $(WindowsToolchainPdbArtifactName) - downloadPath: $(Build.StagingDirectory)\nuget-signed - - - template: templates\common\upload-vs-insertion-artifacts.yml@sdk-insertions - parameters: - githubToken: $(GitHub.Token) - githubContext: $(NupkgCommitStatusName) - blobName: $(NupkgCommitStatusName) - packagePrefix: xamarin-android - artifactsPath: $(Build.StagingDirectory)\nuget-signed - yamlResourceName: yaml-templates - - - template: templates\common\upload-vs-insertion-artifacts.yml@sdk-insertions - parameters: - githubToken: $(GitHub.Token) - githubContext: $(VSDropCommitStatusName) - blobName: $(VSDropCommitStatusName) - packagePrefix: xamarin-android - artifactsPath: $(Build.StagingDirectory)\$(VSDropCommitStatusName) - yamlResourceName: yaml-templates - downloadSteps: - - task: DownloadPipelineArtifact@2 - inputs: - artifactName: vsdrop-signed - downloadPath: $(Build.StagingDirectory)\$(VSDropCommitStatusName) - - - template: templates\common\upload-vs-insertion-artifacts.yml@sdk-insertions - parameters: - githubToken: $(GitHub.Token) - githubContext: $(MultiTargetVSDropCommitStatusName) - blobName: $(MultiTargetVSDropCommitStatusName) - packagePrefix: xamarin-android - artifactsPath: $(Build.StagingDirectory)\$(MultiTargetVSDropCommitStatusName) - yamlResourceName: yaml-templates - downloadSteps: - - task: DownloadPipelineArtifact@2 - inputs: - artifactName: vsdrop-multitarget-signed - downloadPath: $(Build.StagingDirectory)\$(MultiTargetVSDropCommitStatusName) + dropServiceURI: https://devdiv.artifacts.visualstudio.com/DefaultCollection + buildNumber: $(ReleaseDropPrefix)/nugets + destinationPath: $(Build.StagingDirectory)\nuget-signed - task: DotNetCoreCLI@2 displayName: build Xamarin.Android.Tools.BootstrapTasks.sln