[CI] Skip the insertions when not needed in the unified pipeline. (#17455)

This commit is contained in:
Manuel de la Pena 2023-02-06 21:06:51 -05:00 коммит произвёл GitHub
Родитель 961c0e5b5b
Коммит a53585ea0a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 17 добавлений и 12 удалений

Просмотреть файл

@ -52,6 +52,10 @@ parameters:
type: boolean
default: false # only to be used when testing the CI and we do not need a signed pkg
- name: skipInsertion
type: boolean
default: false # just to be skipped by the unified pipeline.
- name: isPR
type: boolean
@ -255,18 +259,19 @@ stages:
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
# .NET Release Prep and VS Insertion Stages, only execute them when the build comes from an official branch and is not a schedule build from OneLoc
# setting the stage at this level makes the graph of the UI look better, else the lines overlap and is not clear.
# Got to disable the lint check because azp yaml template engine does not allow use to do a multiline if :/
# yamllint disable-line rule: line-length
- ${{ if and(ne(variables['Build.Reason'], 'Schedule'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release-test/'), eq(variables['Build.SourceBranch'], 'refs/heads/net7.0'), eq(variables['Build.SourceBranch'], 'refs/heads/net8.0'), eq(parameters.forceInsertion, true))) }}:
- template: ./release/vs-insertion-prep.yml
parameters:
dependsOn:
- sign_notarize_dotnet
isPR: ${{ parameters.isPR }}
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
- ${{ if eq(parameters.skipInsertion, false) }}:
# .NET Release Prep and VS Insertion Stages, only execute them when the build comes from an official branch and is not a schedule build from OneLoc
# setting the stage at this level makes the graph of the UI look better, else the lines overlap and is not clear.
# Got to disable the lint check because azp yaml template engine does not allow use to do a multiline if :/
# yamllint disable-line rule: line-length
- ${{ if and(ne(variables['Build.Reason'], 'Schedule'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release-test/'), eq(variables['Build.SourceBranch'], 'refs/heads/net7.0'), eq(variables['Build.SourceBranch'], 'refs/heads/net8.0'), eq(parameters.forceInsertion, true))) }}:
- template: ./release/vs-insertion-prep.yml
parameters:
dependsOn:
- sign_notarize_dotnet
isPR: ${{ parameters.isPR }}
repositoryAlias: ${{ parameters.repositoryAlias }}
commit: ${{ parameters.commit }}
- stage: funnel
displayName: '${{ parameters.stageDisplayNamePrefix }}Collect signed artifacts'