Skip to content

Commit

Permalink
azure-pipeline.yml: download artifacts from specific branch
Browse files Browse the repository at this point in the history
For different branches of libad9361 are needed artifacts from
specific branches of libiio to work.

Signed-off-by: Andreea Andrisan <[email protected]>
  • Loading branch information
AAndrisa committed Oct 31, 2023
1 parent 2d2d7a9 commit cc7a8da
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
variables:
libiioPipelineId: 9
downlaodBranch: 'refs/heads/libiio-v0'

${{ if eq(variables['Build.SourceBranchName'], 'libad9361-iio-v0') }}:
downloadBranch: 'refs/heads/libiio-v0'
${{ elseif eq(variables['Build.SourceBranchName'], 'next_stable') }}:
downloadBranch: 'refs/heads/next_stable'
${{ elseif eq(variables['Build.Reason'], 'PullRequest') }}:
downloadBranch: $[ format('refs/heads/{0}',replace(replace(variables['System.PullRequest.TargetBranch'], 'libad9361-iio-v0', 'libiio-v0'), 'master', 'main')) ]
${{ else }}:
downloadBranch: 'refs/heads/main'

trigger:
branches:
Expand Down Expand Up @@ -51,7 +59,7 @@ jobs:
pipeline: $(libiioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: $(downlaodBranch)
runBranch: $(downloadBranch)
path: '$(Agent.BuildDirectory)/s/build/'
- script: |
set -e
Expand Down Expand Up @@ -146,7 +154,7 @@ jobs:
pipeline: $(libiioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: $(downlaodBranch)
runBranch: $(downloadBranch)
path: '$(Agent.BuildDirectory)/s/build/'
- script: |
set -e
Expand Down Expand Up @@ -197,7 +205,7 @@ jobs:
pipeline: $(libiioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: $(downlaodBranch)
runBranch: $(downloadBranch)
path: '$(Agent.BuildDirectory)/s/build/'
- script: ./CI/travis/before_install_darwin
displayName: "Install Dependencies"
Expand Down Expand Up @@ -243,7 +251,7 @@ jobs:
pipeline: $(libiioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: $(downlaodBranch)
runBranch: $(downloadBranch)
path: '$(Agent.BuildDirectory)/s/build/'
- task: PowerShell@2
inputs:
Expand Down

0 comments on commit cc7a8da

Please sign in to comment.