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]>
(cherry picked from commit eac9d4c)
  • Loading branch information
AAndrisa committed Apr 1, 2024
1 parent 2bf936d commit 7d55110
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
variables:
libiioPipelineId: 9

${{ 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:
include:
Expand Down Expand Up @@ -48,7 +57,7 @@ jobs:
pipeline: $(libiioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
runBranch: $(downloadBranch)
path: '$(Agent.BuildDirectory)/s/build/'
- script: |
set -e
Expand Down Expand Up @@ -143,7 +152,7 @@ jobs:
pipeline: $(libiioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
runBranch: $(downloadBranch)
path: '$(Agent.BuildDirectory)/s/build/'
- script: |
set -e
Expand Down Expand Up @@ -194,7 +203,7 @@ jobs:
pipeline: $(libiioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
runBranch: $(downloadBranch)
path: '$(Agent.BuildDirectory)/s/build/'
- script: ./CI/travis/before_install_darwin
displayName: "Install Dependencies"
Expand Down Expand Up @@ -240,7 +249,7 @@ jobs:
pipeline: $(libiioPipelineId)
artifact: '$(artifactName)'
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
runBranch: $(downloadBranch)
path: '$(Agent.BuildDirectory)/s/build/'
- task: PowerShell@2
inputs:
Expand Down

0 comments on commit 7d55110

Please sign in to comment.