1
votes

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
Hi friend, does the answer below resolved your question? If yes, appreciate for accepting it as answer like this. - Walter
@WalterQian-MSFT to a certain degree it helps. But it seems to imply that instead of having 3 different projects I should have just one with 3 pipelines. Only if I do so I can see the other builds. If they are in different projects I cannot access the build artifacts no matter what permissions I set for the library project. Would it be possible to give a pipeline and permissions example of 2 projects (project A and project B) depending on the project Library? Is that functionality possible? - Brad Vrabete
This issue is related to the setting in my answer when I test on my side. You can also try to use pipeline resource to consume the artifacts from other pipelines. - Walter
This does not seem to be related to permission. Even if I do not have permission to access the project, I can still download the artifacts from this project. I suggest you double check the settings I mentioned and the visibility of your projects. - Walter
I was able to have that working by disabling the last flag: limit job authorization flag ... That has made it possible to reference a build from another project. - Brad Vrabete

1 Answers

1
votes

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.