Skip to content
Merged
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
21 changes: 15 additions & 6 deletions .pipelines/Modelkit E2E Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,28 @@ schedules:
# check out the same-named release branch from ModelKitArtifacts so the
# artifact content matches the modelkit release. For all other branches
# (e.g. main scheduled runs, manual queue from main), fall back to main.
# Build.SourceBranch is in the form 'refs/heads/release/<name>' which is a
# valid ref value here.
#
# Azure Pipelines only allows template expressions in the *value* position of
# a repository resource's `ref` (not as a YAML key inside `repositories`), so
# the conditional is resolved here in a top-level compile-time variable and
# the `ref` field simply references that variable.
# Build.SourceBranch is in the form 'refs/heads/release/<name>', which is a
# valid `ref` value for a GitHub repository resource.
# See: https://learn.microsoft.com/azure/devops/release-notes/2022/sprint-212-update#template-expressions-in-repository-resource-definition
variables:
- name: artifactsRef
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/release/') }}:
value: ${{ variables['Build.SourceBranch'] }}
${{ else }}:
value: main

resources:
repositories:
- repository: ModelKitArtifacts
type: github
endpoint: github.com_yuesu_microsoft
name: gim-home/ModelKitArtifacts
${{ if startsWith(variables['Build.SourceBranch'], 'refs/heads/release/') }}:
ref: ${{ variables['Build.SourceBranch'] }}
${{ else }}:
ref: main
ref: ${{ variables.artifactsRef }}

parameters:
# --------------------------------------------------------------------
Expand Down
Loading