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 Nov 2, 2023
1 parent 39a0392 commit eac9d4c
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 @@ -52,7 +61,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 @@ -147,7 +156,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 @@ -198,7 +207,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 @@ -244,7 +253,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 eac9d4c

Please sign in to comment.