diff --git a/DevOpsPipelineDefinitions/publish-pipeline.yaml b/DevOpsPipelineDefinitions/publish-pipeline.yaml index ec10f1801019b..da426b0d31321 100644 --- a/DevOpsPipelineDefinitions/publish-pipeline.yaml +++ b/DevOpsPipelineDefinitions/publish-pipeline.yaml @@ -1,4 +1,4 @@ -# Publish pipeline for Windows Package Manager. +# Publish pipeline for WinGet. # Name of the run name: '$(Build.DefinitionName)-$(Build.DefinitionVersion)-$(Date:yyyyMMdd)-$(Rev:r)' @@ -29,31 +29,30 @@ jobs: - task: AzureCLI@1 displayName: 'Azure Setup' inputs: - azureSubscription: '$(PackageManagerSubscription)' + azureSubscription: '$(WinGet.Subscription)' scriptLocation: inlineScript inlineScript: 'az storage blob download-batch -d . --pattern * -s servicewrapper --output none' env: AZURE_STORAGE_CONNECTION_STRING: $(ValidationStorageAccountConnectionString) - # PackageManager setup - - script: 'pkgmgr_publish_setup.cmd' - name: 'pkgmgrsetup' - displayName: 'PackageManager Setup' + # WinGet setup + - script: 'winget_publish_setup.cmd' + name: 'wingetsetup' + displayName: 'WinGet Setup' workingDirectory: scripts env: HOST_KEY: $(AzureFunctionHostKey) - SIGN_ENDPOINT: $(PackageManagerSignEndpoint) + SIGN_ENDPOINT: $(AzFuncSignEndpoint) - task: CmdLine@2 displayName: 'Validate Commits' inputs: - script: 'PackageManagerServiceWrapper.exe validate-commits --operationId %BUILD_BUILDNUMBER%' + script: 'WinGetSvcWrapper.exe validate-commits --operationId %BUILD_BUILDNUMBER%' failOnStderr: true condition: succeeded() env: AzureWebJobsStorage: $(ValidationStorageAccountConnectionString) - CacheConnectionString: $(ActiveCacheConnectionString) - PackageManagerEnvironment: $(PackageManagerEnvironment) + CacheConnectionString: $(CacheStorageAccountConnectionString) PackagePublisher: $(PackagePublisher) DIApplicationInsightKey: $(DIApplicationInsightKey) @@ -65,11 +64,11 @@ jobs: dependsOn: - 'CommitProcessing' variables: - HostKeySecret: $[ dependencies.CommitProcessing.outputs['pkgmgrsetup.hostkey']] - SignEndpointSecret: $[ dependencies.CommitProcessing.outputs['pkgmgrsetup.signEndpoint']] + HostKeySecret: $[ dependencies.CommitProcessing.outputs['wingetsetup.hostkey']] + SignEndpointSecret: $[ dependencies.CommitProcessing.outputs['wingetsetup.signEndpoint']] steps: - # Sign Package Manager package. + # Sign package. - task: AzureFunction@1 displayName: 'Signing package' inputs: @@ -78,6 +77,8 @@ jobs: body: | { "operationId": "$(Build.BuildNumber)", + "PlanUrl": "$(system.CollectionUri)", + "HubName": "$(system.HostType)", "pipelineType": "CommitPipeline", "ProjectId": "$(system.TeamProjectId)", "PlanId": "$(system.PlanId)", @@ -104,7 +105,7 @@ jobs: - task: AzureCLI@1 displayName: 'Azure Setup' inputs: - azureSubscription: '$(PackageManagerSubscription)' + azureSubscription: '$(WinGet.Subscription)' scriptLocation: inlineScript inlineScript: 'az storage blob download-batch -d . --pattern * -s servicewrapper --output none' env: @@ -114,10 +115,10 @@ jobs: - task: CmdLine@2 displayName: 'Publish' inputs: - script: 'PackageManagerServiceWrapper.exe publish --operationId %BUILD_BUILDNUMBER%' + script: 'WinGetSvcWrapper.exe publish --operationId %BUILD_BUILDNUMBER%' failOnStderr: true condition: succeeded() env: AzureWebJobsStorage: $(ValidationStorageAccountConnectionString) - CacheConnectionString: $(ActiveCacheConnectionString) + CacheConnectionString: $(CacheStorageAccountConnectionString) DIApplicationInsightKey: $(DIApplicationInsightKey) diff --git a/DevOpsPipelineDefinitions/rebuild-pipeline.yaml b/DevOpsPipelineDefinitions/rebuild-pipeline.yaml index 1f2793823c49e..277b71c2286db 100644 --- a/DevOpsPipelineDefinitions/rebuild-pipeline.yaml +++ b/DevOpsPipelineDefinitions/rebuild-pipeline.yaml @@ -1,4 +1,4 @@ -# Rebuild pipeline for Windows Package Manager. +# Rebuild pipeline for WinGet. # Name of the run name: '$(Build.DefinitionName)-$(Build.DefinitionVersion)-$(Date:yyyyMMdd)-$(Rev:r)' @@ -27,30 +27,29 @@ jobs: - task: AzureCLI@1 displayName: 'Azure Setup' inputs: - azureSubscription: '$(PackageManagerSubscription)' + azureSubscription: '$(WinGet.Subscription)' scriptLocation: inlineScript inlineScript: 'az storage blob download-batch -d . --pattern * -s servicewrapper --output none' env: AZURE_STORAGE_CONNECTION_STRING: $(ValidationStorageAccountConnectionString) - # PackageManager setup - - script: 'pkgmgr_publish_setup.cmd' - name: 'pkgmgrsetup' - displayName: 'PackageManager Setup' + # WinGet setup + - script: 'winget_publish_setup.cmd' + name: 'wingetsetup' + displayName: 'WinGet Setup' workingDirectory: scripts env: HOST_KEY: $(AzureFunctionHostKey) - SIGN_ENDPOINT: $(PackageManagerSignEndpoint) + SIGN_ENDPOINT: $(AzFuncSignEndpoint) - task: CmdLine@2 displayName: 'Validate Manifests' inputs: - script: 'PackageManagerServiceWrapper.exe rebuild --operationId %BUILD_BUILDNUMBER%' + script: 'WinGetSvcWrapper.exe rebuild --operationId %BUILD_BUILDNUMBER%' failOnStderr: true condition: succeeded() env: AzureWebJobsStorage: $(ValidationStorageAccountConnectionString) - PackageManagerEnvironment: $(PackageManagerEnvironment) PackagePublisher: $(PackagePublisher) SYSTEM_ACCESSTOKEN: $(System.AccessToken) DIApplicationInsightKey: $(DIApplicationInsightKey) @@ -63,11 +62,11 @@ jobs: dependsOn: - 'Rebuild' variables: - HostKeySecret: $[ dependencies.Rebuild.outputs['pkgmgrsetup.hostkey']] - SignEndpointSecret: $[ dependencies.Rebuild.outputs['pkgmgrsetup.signEndpoint']] + HostKeySecret: $[ dependencies.Rebuild.outputs['wingetsetup.hostkey']] + SignEndpointSecret: $[ dependencies.Rebuild.outputs['wingetsetup.signEndpoint']] steps: - # Sign Package Manager package. + # Sign package. - task: AzureFunction@1 displayName: 'Signing package' inputs: @@ -76,6 +75,8 @@ jobs: body: | { "operationId": "$(Build.BuildNumber)", + "PlanUrl": "$(system.CollectionUri)", + "HubName": "$(system.HostType)", "pipelineType": "RebuildPipeline", "ProjectId": "$(system.TeamProjectId)", "PlanId": "$(system.PlanId)", @@ -102,7 +103,7 @@ jobs: - task: AzureCLI@1 displayName: 'Azure Setup' inputs: - azureSubscription: '$(PackageManagerSubscription)' + azureSubscription: '$(WinGet.Subscription)' scriptLocation: inlineScript inlineScript: 'az storage blob download-batch -d . --pattern * -s servicewrapper --output none' env: @@ -112,20 +113,12 @@ jobs: - task: CmdLine@2 displayName: 'Publish' inputs: - script: 'PackageManagerServiceWrapper.exe rebuild-publish --operationId %BUILD_BUILDNUMBER%' + script: 'WinGetSvcWrapper.exe rebuild-publish --operationId %BUILD_BUILDNUMBER%' failOnStderr: true condition: succeeded() env: AzureWebJobsStorage: $(ValidationStorageAccountConnectionString) - AzureServicesAuthConnectionString: $(AzureServicesAuthConnectionString) - CacheConnectionString: $(BackupCacheConnectionString) - CacheAStorageAccountConnectionString: $(CacheAStorageAccountConnectionString) - CacheAStorageAccountName: $(CacheAStorageAccountName) - CacheBStorageAccountConnectionString: $(CacheBStorageAccountConnectionString) - CacheBStorageAccountName: $(CacheBStorageAccountName) - PackageManagerSubscriptionId: $(PackageManagerSubscriptionId) - PackageManagerCdnProfile: $(PackageManagerCdnProfile) - PackageManagerConnectionStringKv: $(PackageManagerConnectionStringKv) + CacheConnectionString: $(CacheStorageAccountConnectionString) DIApplicationInsightKey: $(DIApplicationInsightKey) # Agent phase. Depends on previous job. @@ -149,16 +142,16 @@ jobs: - task: AzureCLI@1 displayName: 'Azure Setup' inputs: - azureSubscription: '$(PackageManagerSubscription)' + azureSubscription: '$(WinGet.Subscription)' scriptLocation: inlineScript inlineScript: 'az storage blob download-batch -d . --pattern * -s servicewrapper --output none' env: AZURE_STORAGE_CONNECTION_STRING: $(ValidationStorageAccountConnectionString) - task: CmdLine@2 - displayName: 'Package Manager Cleanup' + displayName: 'WinGet Cleanup' inputs: - script: 'PackageManagerServiceWrapper.exe rebuild-cleanup --operationId %BUILD_BUILDNUMBER%' + script: 'WinGetSvcWrapper.exe rebuild-cleanup --operationId %BUILD_BUILDNUMBER%' failOnStderr: true condition: succeeded() env: diff --git a/DevOpsPipelineDefinitions/validation-pipeline.yaml b/DevOpsPipelineDefinitions/validation-pipeline.yaml index 06fdf8d92d401..0039d0c943981 100644 --- a/DevOpsPipelineDefinitions/validation-pipeline.yaml +++ b/DevOpsPipelineDefinitions/validation-pipeline.yaml @@ -13,35 +13,38 @@ jobs: displayName: 'Pull Request Validation' pool: vmImage: 'windows-latest' + variables: + skipComponentGovernanceDetection: ${{ true }} + runCodesignValidationInjection: ${{ false }} steps: # Downloads all the setup files and its dependencies. - task: AzureCLI@1 displayName: 'Azure Setup' inputs: - azureSubscription: '$(PackageManagerSubscription)' + azureSubscription: '$(WinGet.Subscription)' scriptLocation: inlineScript inlineScript: 'az storage blob download-batch -d . --pattern * -s servicewrapper --output none' env: AZURE_STORAGE_CONNECTION_STRING: $(ValidationStorageAccountConnectionString) - # PackageManager setup - - script: 'pkgmgr_validation_setup.cmd' - name: 'pkgmgrsetup' - displayName: 'PackageManager Setup' + # WinGet setup + - script: 'winget_validation_setup.cmd' + name: 'wingetsetup' + displayName: 'WinGet Setup' workingDirectory: scripts env: HOST_KEY: $(AzureFunctionHostKey) - SMART_SCREEN_ENDPOINT: $(PackageManagerSmartScreenEndpoint) - SCAN_ENDPOINT: $(PackageManagerScanEndpoint) - LABEL_ENDPOINT: $(PackageManagerSetLabelOnPullRequestEndpoint) - CLEANUP_ENDPOINT: $(PackageManagerCleanupEndpoint) + SMART_SCREEN_ENDPOINT: $(AzFuncSmartScreenEndpoint) + SCAN_ENDPOINT: $(AzFuncScanEndpoint) + LABEL_ENDPOINT: $(AzFuncSetLabelOnPullRequestEndpoint) + CLEANUP_ENDPOINT: $(AzFuncCleanupEndpoint) # Validates integrity of pull request. - task: CmdLine@2 displayName: 'Validate Pull Request' inputs: - script: 'PackageManagerServiceWrapper.exe process-pr --operationId %BUILD_BUILDNUMBER%' + script: 'WinGetSvcWrapper.exe process-pr --operationId %BUILD_BUILDNUMBER%' failOnStderr: true condition: succeeded() env: @@ -52,7 +55,7 @@ jobs: - task: CmdLine@2 displayName: 'Validate Manifest' inputs: - script: 'PackageManagerServiceWrapper.exe validate-manifests --operationId %BUILD_BUILDNUMBER%' + script: 'WinGetSvcWrapper.exe validate-manifests --operationId %BUILD_BUILDNUMBER%' failOnStderr: true condition: succeeded() env: @@ -67,9 +70,9 @@ jobs: dependsOn: - 'FileValidation' variables: - HostKeySecret: $[ dependencies.FileValidation.outputs['pkgmgrsetup.hostkey']] - SmartScreenEndpointSecret: $[ dependencies.FileValidation.outputs['pkgmgrsetup.smartScreenEndpoint']] - ScanEndpointSecret: $[ dependencies.FileValidation.outputs['pkgmgrsetup.scanEndpoint']] + HostKeySecret: $[ dependencies.FileValidation.outputs['wingetsetup.hostkey']] + SmartScreenEndpointSecret: $[ dependencies.FileValidation.outputs['wingetsetup.smartScreenEndpoint']] + ScanEndpointSecret: $[ dependencies.FileValidation.outputs['wingetsetup.scanEndpoint']] steps: # Scans all the urls from manifest contents. @@ -121,16 +124,16 @@ jobs: - 'ContentValidation' condition: succeededOrFailed() variables: - HostKeySecret: $[ dependencies.FileValidation.outputs['pkgmgrsetup.hostkey']] - LabelEndpointSecret: $[ dependencies.FileValidation.outputs['pkgmgrsetup.labelEndpoint']] - RepositoryId: $[ dependencies.FileValidation.outputs['pkgmgrsetup.repoId']] - CleanupEndpointSecret: $[ dependencies.filevalidation.outputs['pkgmgrsetup.cleanupEndpoint']] + HostKeySecret: $[ dependencies.FileValidation.outputs['wingetsetup.hostkey']] + LabelEndpointSecret: $[ dependencies.FileValidation.outputs['wingetsetup.labelEndpoint']] + RepositoryId: $[ dependencies.FileValidation.outputs['wingetsetup.repoId']] + CleanupEndpointSecret: $[ dependencies.filevalidation.outputs['wingetsetup.cleanupEndpoint']] steps: # Set label in GitHub PullRequest. - task: AzureFunction@1 displayName: 'Set Label' - condition: eq(variables['PackageManager.RepositoryType'], 'GitHub') + condition: eq(variables['WinGet.RepositoryType'], 'GitHub') inputs: function: '$(LabelEndpointSecret)' key: '$(HostKeySecret)'