From 4fe0aee4de79981156d2928b16ad8f96ea7548ea Mon Sep 17 00:00:00 2001 From: Ray Chen Date: Fri, 19 Jun 2026 12:23:29 -0700 Subject: [PATCH 1/3] Support no-op for PR pipeline Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/pipelines/pullrequest.yml | 4 ++ .../templates/stages/archetype-sdk-client.yml | 51 ++++++++++++++----- 2 files changed, 41 insertions(+), 14 deletions(-) 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..2789c8392172 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: @@ -121,17 +143,18 @@ extends: - template: /eng/pipelines/templates/variables/globals.yml - template: /eng/pipelines/templates/variables/image.yml - - template: archetype-python-release.yml - parameters: - DependsOn: "Build" - ServiceDirectory: ${{ parameters.ServiceDirectory }} - Artifacts: ${{ parameters.Artifacts }} - ${{ if eq(parameters.ServiceDirectory, 'template') }}: - TestPipeline: true - ArtifactName: packages_extended - DocArtifact: documentation - TargetDocRepoOwner: ${{ parameters.TargetDocRepoOwner }} - TargetDocRepoName: ${{ parameters.TargetDocRepoName }} - DevFeedName: ${{ parameters.DevFeedName }} - PublicFeed: ${{ parameters.PublicFeed }} - PublicPublishEnvironment: ${{ parameters.PublicPublishEnvironment }} + - ${{ if not(and(eq(parameters.SkipPrValidation, true), eq(variables['Build.Reason'], 'Manual'))) }}: + - template: archetype-python-release.yml + parameters: + DependsOn: "Build" + ServiceDirectory: ${{ parameters.ServiceDirectory }} + Artifacts: ${{ parameters.Artifacts }} + ${{ if eq(parameters.ServiceDirectory, 'template') }}: + TestPipeline: true + ArtifactName: packages_extended + DocArtifact: documentation + TargetDocRepoOwner: ${{ parameters.TargetDocRepoOwner }} + TargetDocRepoName: ${{ parameters.TargetDocRepoName }} + DevFeedName: ${{ parameters.DevFeedName }} + PublicFeed: ${{ parameters.PublicFeed }} + PublicPublishEnvironment: ${{ parameters.PublicPublishEnvironment }} From 5851344f5236c5c00be0d9a943d5c949fcd4c97c Mon Sep 17 00:00:00 2001 From: Ray Chen Date: Fri, 19 Jun 2026 12:42:24 -0700 Subject: [PATCH 2/3] Use runtime condition for PR no-op release skip Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../stages/archetype-python-release.yml | 3 +- .../templates/stages/archetype-sdk-client.yml | 30 +++++++++---------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 389ac773c7a5..63c1706fa992 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -3,6 +3,7 @@ parameters: TestPipeline: false ArtifactName: 'not-specified' ServiceDirectory: 'not-specified' + SkipPrValidation: false DependsOn: Build DocArtifact: 'documentation' DevFeedName: 'public/azure-sdk-for-python' @@ -20,7 +21,7 @@ stages: dependsOn: ${{parameters.DependsOn}} variables: - template: /eng/pipelines/templates/variables/image.yml - condition: and(succeeded(), ne(variables['SetDevVersion'], 'true'), ne(variables['Skip.Release'], 'true'), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-python-pr')) + condition: and(succeeded(), not(and(eq(${{ parameters.SkipPrValidation }}, true), eq(variables['Build.Reason'], 'Manual'))), ne(variables['SetDevVersion'], 'true'), ne(variables['Skip.Release'], 'true'), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-python-pr')) jobs: - job: TagRepository displayName: "Create release tag" diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index 2789c8392172..b852e2ee291e 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -143,18 +143,18 @@ extends: - template: /eng/pipelines/templates/variables/globals.yml - template: /eng/pipelines/templates/variables/image.yml - - ${{ if not(and(eq(parameters.SkipPrValidation, true), eq(variables['Build.Reason'], 'Manual'))) }}: - - template: archetype-python-release.yml - parameters: - DependsOn: "Build" - ServiceDirectory: ${{ parameters.ServiceDirectory }} - Artifacts: ${{ parameters.Artifacts }} - ${{ if eq(parameters.ServiceDirectory, 'template') }}: - TestPipeline: true - ArtifactName: packages_extended - DocArtifact: documentation - TargetDocRepoOwner: ${{ parameters.TargetDocRepoOwner }} - TargetDocRepoName: ${{ parameters.TargetDocRepoName }} - DevFeedName: ${{ parameters.DevFeedName }} - PublicFeed: ${{ parameters.PublicFeed }} - PublicPublishEnvironment: ${{ parameters.PublicPublishEnvironment }} + - template: archetype-python-release.yml + parameters: + DependsOn: "Build" + ServiceDirectory: ${{ parameters.ServiceDirectory }} + SkipPrValidation: ${{ parameters.SkipPrValidation }} + Artifacts: ${{ parameters.Artifacts }} + ${{ if eq(parameters.ServiceDirectory, 'template') }}: + TestPipeline: true + ArtifactName: packages_extended + DocArtifact: documentation + TargetDocRepoOwner: ${{ parameters.TargetDocRepoOwner }} + TargetDocRepoName: ${{ parameters.TargetDocRepoName }} + DevFeedName: ${{ parameters.DevFeedName }} + PublicFeed: ${{ parameters.PublicFeed }} + PublicPublishEnvironment: ${{ parameters.PublicPublishEnvironment }} From dcda9fb09b16b382971df9f19a891ce0d21e4cdf Mon Sep 17 00:00:00 2001 From: Ray Chen Date: Fri, 19 Jun 2026 12:51:32 -0700 Subject: [PATCH 3/3] Rely on build dependency for PR no-op release skip Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- eng/pipelines/templates/stages/archetype-python-release.yml | 3 +-- eng/pipelines/templates/stages/archetype-sdk-client.yml | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/eng/pipelines/templates/stages/archetype-python-release.yml b/eng/pipelines/templates/stages/archetype-python-release.yml index 63c1706fa992..389ac773c7a5 100644 --- a/eng/pipelines/templates/stages/archetype-python-release.yml +++ b/eng/pipelines/templates/stages/archetype-python-release.yml @@ -3,7 +3,6 @@ parameters: TestPipeline: false ArtifactName: 'not-specified' ServiceDirectory: 'not-specified' - SkipPrValidation: false DependsOn: Build DocArtifact: 'documentation' DevFeedName: 'public/azure-sdk-for-python' @@ -21,7 +20,7 @@ stages: dependsOn: ${{parameters.DependsOn}} variables: - template: /eng/pipelines/templates/variables/image.yml - condition: and(succeeded(), not(and(eq(${{ parameters.SkipPrValidation }}, true), eq(variables['Build.Reason'], 'Manual'))), ne(variables['SetDevVersion'], 'true'), ne(variables['Skip.Release'], 'true'), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-python-pr')) + condition: and(succeeded(), ne(variables['SetDevVersion'], 'true'), ne(variables['Skip.Release'], 'true'), ne(variables['Build.Repository.Name'], 'Azure/azure-sdk-for-python-pr')) jobs: - job: TagRepository displayName: "Create release tag" diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index b852e2ee291e..53efd1ab54b0 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -147,7 +147,6 @@ extends: parameters: DependsOn: "Build" ServiceDirectory: ${{ parameters.ServiceDirectory }} - SkipPrValidation: ${{ parameters.SkipPrValidation }} Artifacts: ${{ parameters.Artifacts }} ${{ if eq(parameters.ServiceDirectory, 'template') }}: TestPipeline: true