Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions eng/pipelines/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ parameters:
- name: Service
type: string
default: auto
- name: SkipPrValidation
type: boolean
default: false
# Switch to canary to test canary 1es branch. 1es template validation will set this parameter
# to canary on run.
- name: oneESTemplateTag
Expand All @@ -27,6 +30,7 @@ extends:
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
oneESTemplateTag: ${{ parameters.oneESTemplateTag }}
SkipPrValidation: ${{ parameters.SkipPrValidation }}
# Short term hack to get 1es canary validation working until we can fix manual runs with 'auto'
${{ if and(eq(parameters.oneESTemplateTag, 'canary'), eq(parameters.Service, 'auto')) }}:
ServiceDirectory: template
Expand Down
25 changes: 23 additions & 2 deletions eng/pipelines/templates/stages/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ parameters:
- name: ServiceDirectory
type: string
default: not-specified
- name: SkipPrValidation
type: boolean
default: false
- name: BuildSnippets
type: boolean
default: true
Expand Down Expand Up @@ -63,7 +66,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')))
variables:
Comment on lines 87 to 89
- template: /eng/pipelines/templates/variables/globals.yml
- template: /eng/pipelines/templates/variables/image.yml
Expand Down Expand Up @@ -94,7 +116,7 @@ extends:
TestDependsOnDependency: ${{ parameters.TestDependsOnDependency }}

# The Prerelease and Release stages are conditioned on whether we are building a pull request and the branch.
- ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}}:
- ${{if and(not(and(eq(parameters.SkipPrValidation, true), eq(variables['Build.Reason'], 'Manual'))), ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}}:

- template: archetype-net-release.yml
parameters:
Expand All @@ -111,4 +133,3 @@ extends:
ArtifactName: packages
PublicFeed: ${{ parameters.PublicFeed }}
PublicPublishEnvironment: ${{ parameters.PublicPublishEnvironment }}