AzureDevops: using artifacts from another pipeline

Viewed 1206

I have a system consisting of several components that are stored in their own Git repositories (2 apps and one library). Each has its own Azure Devops pipeline. The library builds fine and, as part of the pipeline, I can save the binaries as artifacts but I am unable to find the correct parameters that would allow me to use those artifacts in the other pipelines.

The pipeline step is:

steps:
- task: DownloadPipelineArtifact@2
  inputs:
    buildType: 'specific'
    project: 'e6[...]a'
    definition: '2'
    buildVersionToDownload: 'specific'
    pipelineId: '22'
    artifactName: '[...] Library'
    targetPath: '$(Pipeline.Workspace)'

The error I get is below. How should I be making the connection between the 2 projects?

Starting: DownloadBuildArtifacts ============================================================================== Task : Download build artifacts Description : Download files that were saved as artifacts of a completed build Version : 0.178.0 Author : Microsoft Corporation Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/download-build-artifacts ============================================================================== Error: in getBuildId, so retrying => retries pending : 4 Error: in getBuildId, so retrying => retries pending : 3 Error: in getBuildId, so retrying => retries pending : 2 Error: in getBuildId, so retrying => retries pending : 1 ##[error]Failed in getBuildId with error: Error: VS800075: The project with id 'vstfs:///Classification/TeamProject/e6[...]a' does not exist, or you do not have permission to access it. ##[error]Error: VS800075: The project with id 'vstfs:///Classification/TeamProject/e6[..]a' does not exist, or you do not have permission to access it. Finishing: DownloadBuildArtifacts

1 Answers

Please check the following settings:

1.Please disable Limit job authorization scope to current project for non-release pipelines option in Project Settings: enter image description here If this option is grayed out, please change it in the organization settings first.

2.Please check the Visibility of your project.

enter image description here

If your pipeline is in a public project, then the job authorization scope is automatically restricted to project no matter what you configure in any setting. Jobs in a public project can access resources such as build artifacts or test results only within the project and not from other projects of the organization.

You can refer to the document about Access repositories, artifacts, and other resources.

Related