mirror of
https://github.com/Mintplex-Labs/winget-pkgs.git
synced 2026-07-01 18:28:34 -04:00
eab30aa4f7
* This PR migrates the WinGetSVC Rebuild Rest pipeline to 1ES, including changes to the following files: - rebuild-rest-pipeline.yaml The winget-pkgs repo was updated with the changes from the winget-pkgs-preprod repo, which had been merged from the pipeline staging process through PR. This manual copying was necessary because the automatic deployment failed for the production pipeline. [How Validated:] - The changes have been validated against the preprod environment by manually triggering the pipeline and ensuring successful runs. WinGetSvc-Publish-ppe * Improve consistency of pipeline stage names This commit updates the pipeline stage names to be more consistent across all pipelines. This change improves the readability of the pipeline code.
95 lines
3.1 KiB
YAML
95 lines
3.1 KiB
YAML
# Rebuild pipeline for WinGet rest source.
|
|
|
|
# Name of the run
|
|
name: '$(Build.DefinitionName)-$(Build.DefinitionVersion)-$(Date:yyyyMMdd)-$(Rev:r)'
|
|
|
|
trigger: none
|
|
pr: none
|
|
|
|
resources:
|
|
repositories:
|
|
- repository: 1ESPipelineTemplates
|
|
type: git
|
|
name: 1ESPipelineTemplates/1ESPipelineTemplates
|
|
ref: refs/tags/release
|
|
extends:
|
|
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
|
|
parameters:
|
|
pool:
|
|
name: Azure-Pipelines-1ESPT-ExDShared
|
|
image: windows-2022
|
|
os: windows
|
|
customBuildTags:
|
|
- ES365AIMigrationTooling
|
|
|
|
stages:
|
|
- stage: WinGetSvc_Rest_Rebuild
|
|
jobs:
|
|
# Agent phase.
|
|
- job: 'Rebuild'
|
|
displayName: 'Start Rebuild'
|
|
variables:
|
|
skipComponentGovernanceDetection: ${{ true }}
|
|
runCodesignValidationInjection: ${{ false }}
|
|
timeoutInMinutes: 0
|
|
steps:
|
|
|
|
# Allow scripts to access the system token.
|
|
- checkout: none
|
|
persistCredentials: true
|
|
|
|
# Downloads all the setup files and its dependencies.
|
|
- task: AzureCLI@1
|
|
displayName: 'Azure Setup'
|
|
inputs:
|
|
azureSubscription: '$(WinGet.Subscription)'
|
|
scriptLocation: inlineScript
|
|
inlineScript: 'az storage blob download-batch -d . --pattern * -s servicewrapper --output none'
|
|
env:
|
|
AZURE_STORAGE_CONNECTION_STRING: $(ValidationStorageAccountConnectionString)
|
|
|
|
# WinGet setup
|
|
- task: CmdLine@2
|
|
name: 'wingetsetup'
|
|
displayName: 'WinGet Setup'
|
|
env:
|
|
HOST_KEY: $(AzureFunctionHostKey)
|
|
RESTSOURCE_REBUILD_ENDPOINT: $(AzFuncRestSourceRebuildEndpoint)
|
|
inputs:
|
|
script: 'winget_rebuild_setup.cmd'
|
|
workingDirectory: scripts
|
|
|
|
# Agentless phase. Depends on previous job.
|
|
- job: 'PublishToRestSource'
|
|
pool: server
|
|
timeoutInMinutes: 1500
|
|
displayName: 'Publish to rest source'
|
|
dependsOn:
|
|
- 'Rebuild'
|
|
variables:
|
|
HostKeySecret: $[ dependencies.Rebuild.outputs['wingetsetup.hostkey']]
|
|
RestSourceRebuildEndpointSecret: $[ dependencies.Rebuild.outputs['wingetsetup.restsourceRebuildEndpoint']]
|
|
steps:
|
|
|
|
# Rebuild Rest source.
|
|
- task: AzureFunction@1
|
|
displayName: 'Publish to rest source'
|
|
inputs:
|
|
function: '$(RestSourceRebuildEndpointSecret)'
|
|
key: '$(HostKeySecret)'
|
|
body: |
|
|
{
|
|
"operationId": "$(Build.BuildNumber)",
|
|
"BuildId": "$(Build.BuildId)",
|
|
"PlanUrl": "$(system.CollectionUri)",
|
|
"HubName": "$(system.HostType)",
|
|
"pipelineType": "RebuildPipeline",
|
|
"ProjectId": "$(system.TeamProjectId)",
|
|
"PlanId": "$(system.PlanId)",
|
|
"JobId": "$(system.JobId)",
|
|
"TimelineId": "$(system.TimelineId)",
|
|
"TaskInstanceId": "$(system.TaskInstanceId)",
|
|
"AuthToken": "$(system.AccessToken)"
|
|
}
|
|
waitForCompletion: "true"
|