[CI] Allow to force a build to be usable for insertions. (#13563)
This change allows to have a parameter (false by default) that allows to get a build to be able to do an insertion even when it is comming from a not predefined branch. Uses cases: 1. Trigger a buiild with no tests from a special branch to insert. 2. Work with the CI to test the deployment.
This commit is contained in:
Родитель
5c68aca748
Коммит
06bacc24a4
|
@ -36,6 +36,11 @@ parameters:
|
|||
type: boolean
|
||||
default: true
|
||||
|
||||
- name: forceInsertion
|
||||
displayName: Force Insertion
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
# We are doing some black magic. We have several templates that
|
||||
# are executed with different parameters.
|
||||
#
|
||||
|
@ -254,7 +259,7 @@ stages:
|
|||
enableDotnet: ${{ parameters.enableDotnet }}
|
||||
|
||||
# .NET 6 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
|
||||
- ${{ if and(ne(variables['Build.Reason'], 'Schedule'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'))) }}:
|
||||
- ${{ if and(ne(variables['Build.Reason'], 'Schedule'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), eq(parameters.forceInsertion, true))) }}:
|
||||
- template: templates/release/vs-insertion-prep.yml
|
||||
|
||||
# Test stages
|
||||
|
|
Загрузка…
Ссылка в новой задаче