Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 7 additions & 1 deletion eng/pipelines/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ pr:
- pipelinev3*
paths:
include:
- "*"
- "*"
exclude:
- .github/skills/**

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 @@ -28,6 +33,7 @@ extends:
template: /eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
oneESTemplateTag: ${{ parameters.oneESTemplateTag }}
SkipPrValidation: ${{ parameters.SkipPrValidation }}
Comment thread
raych1 marked this conversation as resolved.
# 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
28 changes: 25 additions & 3 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: ExcludePaths
type: object
default: []
Expand Down Expand Up @@ -79,7 +82,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:
- template: /eng/pipelines/templates/variables/globals.yml
- template: /eng/pipelines/templates/variables/image.yml
Expand Down Expand Up @@ -136,15 +158,15 @@ extends:
BuildParallelization: ${{ parameters.BuildParallelization }}
TestParallelization: ${{ parameters.TestParallelization }}

- ${{ if parameters.AdditionalStagesAfterBuild }}:
- ${{ if and(not(and(eq(parameters.SkipPrValidation, true), eq(variables['Build.Reason'], 'Manual'))), gt(length(parameters.AdditionalStagesAfterBuild), 0)) }}:
- ${{ parameters.AdditionalStagesAfterBuild }}

- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'],'IndividualCI')) }}:
- ${{ if and(not(and(eq(parameters.SkipPrValidation, true), eq(variables['Build.Reason'], 'Manual'))), eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'],'IndividualCI')) }}:
- ${{ parameters.LiveTestStages }}

# The Prerelease and Release stages are conditioned on whether we are building a pull request and the branch.
# The tests-weekly check needs to be done so we don't create signing/release tasks for manual weekly-test runs
- ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'), not(contains(variables['Build.DefinitionName'], 'tests-weekly'))) }}:
- ${{if and(not(and(eq(parameters.SkipPrValidation, true), eq(variables['Build.Reason'], 'Manual'))), ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'), not(contains(variables['Build.DefinitionName'], 'tests-weekly'))) }}:
- template: archetype-java-release-batch.yml
parameters:
DependsOn:
Expand Down