Skip to content

Commit

Permalink
[ci] Use official build debian pkg instead and parameterize source br…
Browse files Browse the repository at this point in the history
…anch (#2079)

#### What I did
1. Use official build debian pkg.
2. parameterize download source branch for future release branch.
  • Loading branch information
liushilongbuaa authored Feb 23, 2022
1 parent a9bbaf2 commit 25b3455
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,22 @@ stages:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster:latest

steps:
- script: |
sourceBranch=$(Build.SourceBranchName)
if [[ "$(Build.Reason)" == "PullRequest" ]];then
sourceBranch=$(System.PullRequest.TargetBranch)
fi
echo "Download artifact branch: $sourceBranch"
echo "##vso[task.setvariable variable=sourceBranch]$sourceBranch"
displayName: "Get correct artifact downloading branch"
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 1
pipeline: 142
artifact: sonic-buildimage.vs
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
runBranch: 'refs/heads/$(sourceBranch)'
displayName: "Download artifacts from latest sonic-buildimage build"

- script: |
Expand Down

0 comments on commit 25b3455

Please sign in to comment.