Update pipelines (#6)
This commit is contained in:
@@ -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)'
|
||||
|
Reference in New Issue
Block a user