From cab681e8ffd56bc1231027df0bbbb3edbabc2e6b Mon Sep 17 00:00:00 2001 From: wingetbot <63816999+wingetbot@users.noreply.github.com> Date: Tue, 16 Feb 2021 15:17:06 -0800 Subject: [PATCH] Update pipelines with release WinGetSvc-Release-20210209.3-02 (#7524) Co-authored-by: Release bot --- .../publish-pipeline.yaml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/DevOpsPipelineDefinitions/publish-pipeline.yaml b/DevOpsPipelineDefinitions/publish-pipeline.yaml index 1ad6781fb..5bcdaa0bc 100644 --- a/DevOpsPipelineDefinitions/publish-pipeline.yaml +++ b/DevOpsPipelineDefinitions/publish-pipeline.yaml @@ -43,6 +43,7 @@ jobs: env: HOST_KEY: $(AzureFunctionHostKey) SIGN_ENDPOINT: $(AzFuncSignEndpoint) + CLEANUP_ENDPOINT: $(AzFuncPublishCleanupEndpoint) - task: CmdLine@2 displayName: 'Validate Commits' @@ -122,3 +123,38 @@ jobs: ValidationConnectionString: $(ValidationStorageAccountConnectionString) CacheConnectionString: $(CacheStorageAccountConnectionString) DIApplicationInsightKey: $(DIApplicationInsightKey) + +# Agentless phase. Depends on previous job. +- job: 'Cleanup' + pool: server + timeoutInMinutes: 1500 + displayName: 'Clean up' + dependsOn: + - 'CommitProcessing' + - 'Publish' + variables: + HostKeySecret: $[ dependencies.CommitProcessing.outputs['wingetsetup.hostkey']] + CleanEndpointSecret: $[ dependencies.CommitProcessing.outputs['wingetsetup.cleanupEndpoint']] + steps: + + # Close issues. + - task: AzureFunction@1 + displayName: 'Cleanup Issues' + inputs: + function: '$(CleanEndpointSecret)' + key: '$(HostKeySecret)' + body: | + { + "operationId": "$(Build.BuildNumber)", + "PlanUrl": "$(system.CollectionUri)", + "HubName": "$(system.HostType)", + "pipelineType": "CommitPipeline", + "ProjectId": "$(system.TeamProjectId)", + "PlanId": "$(system.PlanId)", + "JobId": "$(system.JobId)", + "TimelineId": "$(system.TimelineId)", + "TaskInstanceId": "$(system.TaskInstanceId)", + "AuthToken": "$(system.AccessToken)", + "BuildRepositoryId": "$(build.repository.id)" + } + waitForCompletion: "true"