From 7d551101dd2e5602a8183ba0f87476b9e165f7f5 Mon Sep 17 00:00:00 2001 From: Andreea Andrisan Date: Tue, 31 Oct 2023 17:24:19 +0200 Subject: [PATCH 1/2] azure-pipeline.yml: download artifacts from specific branch For different branches of libad9361 are needed artifacts from specific branches of libiio to work. Signed-off-by: Andreea Andrisan (cherry picked from commit eac9d4c963358a7df9f0d2f107e732830d3661c9) --- azure-pipelines.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 54d18a4..324dfff 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -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: @@ -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 @@ -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 @@ -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" @@ -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: From c2bdd3f1d8063ececfd73de1d22e4d957aeb301f Mon Sep 17 00:00:00 2001 From: Andreea Andrisan Date: Fri, 29 Mar 2024 14:41:31 +0200 Subject: [PATCH 2/2] azure-pipeline.yml: add downloadBranch for release branch case Signed-off-by: Andreea Andrisan (cherry picked from commit 99221129ba10be40ffab0fb8b5e28a5545fbee9e) --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 324dfff..933d204 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -5,6 +5,8 @@ variables: downloadBranch: 'refs/heads/libiio-v0' ${{ elseif eq(variables['Build.SourceBranchName'], 'next_stable') }}: downloadBranch: 'refs/heads/next_stable' + ${{ elseif startsWith(variables['Build.SourceBranchName'], '20') }}: + downloadBranch: $(Build.SourceBranch) ${{ 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 }}: