Skip to content

Commit

Permalink
Pipeline experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinholla committed Jun 21, 2023
1 parent 87d8eb3 commit 6940d9e
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,25 @@ pr:
- 202???
- 201???

variables:
- name: BUILD_BRANCH
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
value: $(System.PullRequest.TargetBranch)
${{ else }}:
value: $(Build.SourceBranchName)

resources:
repositories:
- repository: sonic-mgmt-common
type: github
name: sonic-net/sonic-mgmt-common
endpoint: sonic-net
ref: b64a80e9253eaf49315aa4bf7dfd4423f848ae80 # there is no 202305 branch in sonic-mgmt-common yet
- repository: sonic-swss-common
type: github
name: sonic-net/sonic-swss-common
endpoint: sonic-net
ref: refs/heads/$(BUILD_BRANCH)

stages:
- stage: Build
Expand All @@ -47,6 +56,14 @@ stages:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-bullseye:latest

steps:
- script: |
echo "BUILD_BRANCH = $(BUILD_BRANCH)"
echo "Build.Reason = $(Build.Reason)"
echo "Build.SourceBranch = $(Build.SourceBranch)"
echo "Build.SourceBranchName = $(Build.SourceBranchName)"
echo "System.Pullrequest.TargetBranch = $(System.Pullrequest.TargetBranch)"
displayName: Dump Variables
- checkout: self
clean: true
submodules: recursive
Expand All @@ -69,7 +86,7 @@ stages:
pipeline: 1
artifact: sonic-buildimage.vs
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
runBranch: 'refs/heads/$(BUILD_BRANCH)'
displayName: "Download sonic buildimage"

- task: DownloadPipelineArtifact@2
Expand Down

0 comments on commit 6940d9e

Please sign in to comment.