From eef98244d311cb9c39946433da5c979f28e33370 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Thu, 10 Dec 2020 15:17:09 +0200 Subject: [PATCH] ci,azure-pipelines: download artifacts from libiio's pipeline With this, the libad9361-iio build will download artifacts from the libiio pipeline, and use them. Signed-off-by: Alexandru Ardelean --- azure-pipelines.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e478502..261ea9f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,5 +1,10 @@ variables: + libiioPipelineId: 9 branchName: $[ variables['Build.SourceBranchName'] ] + ${{ if eq(variables['Build.Reason'], 'PullRequest') }}: + targetBranch: $[ variables['System.PullRequest.TargetBranch'] ] + ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: + targetBranch: $(branchName) trigger: - main @@ -21,26 +26,42 @@ jobs: OS_TYPE: 'centos_docker' OS_VERSION: 7 artifactName: 'libiio-Linux-CentOS-7' + PACKAGE_TO_INSTALL: 'build/*.rpm' centos_8_x86_64: imageName: 'ubuntu-latest' OS_TYPE: 'centos_docker' OS_VERSION: 8 artifactName: 'libiio-Linux-CentOS-8' + PACKAGE_TO_INSTALL: 'build/*.rpm' ubuntu_16_04_x86_64: imageName: 'ubuntu-16.04' artifactName: 'libiio-Linux-Ubuntu-16.04' + PACKAGE_TO_INSTALL: 'build/*.deb' ubuntu_18_04_x86_64: imageName: 'ubuntu-18.04' artifactName: 'libiio-Linux-Ubuntu-18.04' + PACKAGE_TO_INSTALL: 'build/*.deb' ubuntu_20_04_x86_64: imageName: 'ubuntu-20.04' artifactName: 'libiio-Linux-Ubuntu-20.04' + PACKAGE_TO_INSTALL: 'build/*.deb' pool: vmImage: $(imageName) steps: - checkout: self fetchDepth: 1 clean: true + - task: DownloadPipelineArtifact@2 + inputs: + source: 'specific' + project: '$(System.TeamProjectId)' + pipeline: $(libiioPipelineId) + # FIXME: we may want to un-comment this at some point to make sure that + # release artifacts don't get used for master artifacts and vice-versa + #runVersion: 'latestFromBranch' + #runBranch: 'refs/heads/$(targetBranch)' + artifact: '$(artifactName)-$(targetBranch)' + path: '$(Agent.BuildDirectory)/s/build/' - script: ./CI/travis/before_install_linux displayName: "Install Dependencies" - script: ./CI/travis/make_linux @@ -74,10 +95,21 @@ jobs: # artifactName: 'libiio-macOS-11.0' pool: vmImage: $(imageName) + variables: + PACKAGE_TO_INSTALL: 'build/*.pkg' steps: - checkout: self fetchDepth: 1 clean: true + - task: DownloadPipelineArtifact@2 + inputs: + source: 'specific' + project: '$(System.TeamProjectId)' + pipeline: $(libiioPipelineId) + #runVersion: 'latestFromBranch' + #runBranch: 'refs/heads/$(targetBranch)' + artifact: '$(artifactName)-$(branchName)' + path: '$(Agent.BuildDirectory)/s/build/' - script: ./CI/travis/before_install_darwin displayName: "Install Dependencies" - script: ./CI/travis/make_darwin