diff --git a/eng/pipelines/pullrequest.yml b/eng/pipelines/pullrequest.yml index 723041485449..9b69eb70c228 100644 --- a/eng/pipelines/pullrequest.yml +++ b/eng/pipelines/pullrequest.yml @@ -14,11 +14,15 @@ parameters: - name: Service type: string default: auto + - name: SkipPrValidation + type: boolean + default: false extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: ${{ parameters.Service }} + SkipPrValidation: ${{ parameters.SkipPrValidation }} BuildTargetingString: "*" TestProxy: true TestTimeOutInMinutes: 180 diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index 83538625d656..53efd1ab54b0 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -2,6 +2,9 @@ parameters: - name: ServiceDirectory type: string default: not-specified + - name: SkipPrValidation + type: boolean + default: false - name: Artifacts type: object default: [] @@ -87,7 +90,26 @@ extends: parameters: oneESTemplateTag: ${{ parameters.oneESTemplateTag }} stages: + - ${{ if and(eq(parameters.SkipPrValidation, true), eq(variables['Build.Reason'], 'Manual')) }}: + - stage: NoOp + displayName: No-op + variables: + - template: /eng/pipelines/templates/variables/globals.yml + - template: /eng/pipelines/templates/variables/image.yml + jobs: + - job: NoOp + displayName: No-op + pool: + name: $(LINUXPOOL) + image: $(LINUXVMIMAGE) + os: linux + steps: + - checkout: none + - pwsh: Write-Host "PR validation skipped because SkipPrValidation was set to true for a manual run." + displayName: Skip PR validation + - stage: Build + condition: not(and(eq(${{ parameters.SkipPrValidation }}, true), eq(variables['Build.Reason'], 'Manual'))) jobs: - template: /eng/pipelines/templates/jobs/ci.yml parameters: