mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
more control over the release step condition (#20820)
* more control over the release step condition * update comment * update comments * new implementation * update comments
This commit is contained in:
@@ -129,7 +129,22 @@ stages:
|
|||||||
# timeoutInMinutes: 90
|
# timeoutInMinutes: 90
|
||||||
|
|
||||||
- stage: Release
|
- stage: Release
|
||||||
condition: and(succeeded(), or(eq(variables['VSCODE_RELEASE'], 'true'), and(eq(variables['VSCODE_QUALITY'], 'insider'), eq(variables['Build.Reason'], 'Schedule'))))
|
# Requirements:
|
||||||
|
# 1. Release can be created only from builds of the official build pipeline, but not all builds of it should be released automatically.
|
||||||
|
# 2. A build should be released only when the release variable is set to true.
|
||||||
|
# 3. The daily scheduled Insiders build should be released automatically.
|
||||||
|
#
|
||||||
|
# Limitation:
|
||||||
|
# Ideally, we should be able to use the condition `and(succeeded(), eq(variables['VSCODE_RELEASE'], 'true')` to achieve what we want. The VSCODE_RELEASE variable can be defined as overwritable or non-overwritable based on whether we want to
|
||||||
|
# release from the pipeline. Unfortunately ADO doesn't allow overriding variable values for scheduled runs. (see https://learn.microsoft.com/en-us/azure/devops/pipelines/process/scheduled-triggers?view=azure-devops&tabs=yaml#scheduled-triggers).
|
||||||
|
# This means we can't simply set VSCODE_RELEASE to true only for scheduled builds and have to set it to true for all runs of the pipeline by default.
|
||||||
|
#
|
||||||
|
# Implementation:
|
||||||
|
# Set the VSCODE_RELEASE variable's default value to true and add the release tag for following scenarios:
|
||||||
|
# 1. The build is a scheduled insiders build.
|
||||||
|
# 2. The build is not an insiders build. e.g. rc1, stable, saw.
|
||||||
|
# To release an ad-hoc insiders build, manually add 'Release' tag to the build.
|
||||||
|
condition: and(succeeded(), eq(variables['VSCODE_RELEASE'], 'true'), or(ne(variables['VSCODE_QUALITY'], 'insider'), and(eq(variables['VSCODE_QUALITY'], 'insider'), eq(variables['Build.Reason'], 'Schedule'))))
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'Ubuntu-20.04'
|
vmImage: 'Ubuntu-20.04'
|
||||||
dependsOn:
|
dependsOn:
|
||||||
@@ -137,7 +152,7 @@ stages:
|
|||||||
- Linux
|
- Linux
|
||||||
- Windows
|
- Windows
|
||||||
jobs:
|
jobs:
|
||||||
- job: Release
|
- job: Add Release Tag
|
||||||
steps:
|
steps:
|
||||||
- template: sql-release.yml
|
- template: sql-release.yml
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user