Azure-devops-docs: What is the difference between build and pipeline artifacts?

Created on 3 Nov 2018  Â·  26Comments  Â·  Source: MicrosoftDocs/azure-devops-docs

There are _build_ artifact publishing and downloading tasks. There are also _pipeline_ artifact publishing and downloading tasks. What is the difference between build and pipeline artifacts? When is one appropriate over the other?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Pri1 devopprod

Most helpful comment

Hey everyone - I'm from the Azure Artifacts team and we built the Pipeline Artifacts feature that you've discovered in Azure Pipelines.

I'll address the most important comment around documentation - we've got a whole new page coming out around Artifacts in Azure Pipelines which lists out each artifact type that we support and what they are for along with links to specific documentation. We think that should answer most of your questions.

Because that is still being edited before we publish it I thought I would give you the 30,000 foot view on the difference between Pipeline Artifacts and Build Artifacts and also mention how Pipeline Artifacts relate to Universal Packages.

Build Artifacts (published via the Publish Build Artifacts task) have been in Azure DevOps for a long time and are the built-in artifact storage mechanism for Azure Pipelines. Most builds that store non-package artifacts today would likely use this task. The task can push the content up to the server/cloud but can also copy the files to a local file share.

Pipeline Artifacts (published using the Publish Pipeline Artifact task are intended as the replacement for Build Artifacts. They are in preview right now and there are a few more things we need to do to reach parity. The benefit of Pipeline Artifacts is that they can dramatically reduce the time it takes to upload and download _large_ artifacts. We do this be first checking whether the content that is being uploaded exists in the service. We do this not just at the per-file level but also at the sub-file level (in up to 128K chunks). It can lead to really dramatic performance improvements.

Universal Packages - also in preview use the same storage/transfer technology as Pipeline Artifacts. You would use Universal Packages when you want to create an artifact with a life time independent of the pipeline that created it. You can download Pipeline Artifacts after a pipeline has completed via the artifacts UX - but if you want something that really exists independent of pipeline you would go for Universal Packages. There should be no performance difference between the two.

Hopefully this helps. Feel free to ask any more questions and I'll follow-up with answers.

All 26 comments

I just stumbled on that too. I noted the following differences:

  • a build artifact is contained in a folder named after the artifact name, and when you download it, all your stuff is in that folder. The pipeline artifact is not, allowing to transfer things from one job to another and having them extracted exactly at the same location.
  • a build artifact can be downloaded as a zip from the Azure GUI. A pipeline artifact can't
  • a pipeline artifact is not downloaded by a release "download build artifacts" task.

@mitchdenny and @elbatk are working on docs that cover this in detail.

I wonder if pipeline artifact will work where build artifacts fail during build of a PR from a forked repo.

Wouldn't it make sense that pipeline artifacts are not visible in the artifact list after the build is completed? Or that they appear in a different tab? AFAIU, their purpose is only to pass stuff across jobs of a build, they're not meant to be retrieved by users.

Where do you find the purpose documented, @afeblot?

@AArnott, I did not find any documented purpose. That should as well be added to the doc to help users decide what they should use. That was just my own understanding, based on task names and behaviors.

Hey everyone - I'm from the Azure Artifacts team and we built the Pipeline Artifacts feature that you've discovered in Azure Pipelines.

I'll address the most important comment around documentation - we've got a whole new page coming out around Artifacts in Azure Pipelines which lists out each artifact type that we support and what they are for along with links to specific documentation. We think that should answer most of your questions.

Because that is still being edited before we publish it I thought I would give you the 30,000 foot view on the difference between Pipeline Artifacts and Build Artifacts and also mention how Pipeline Artifacts relate to Universal Packages.

Build Artifacts (published via the Publish Build Artifacts task) have been in Azure DevOps for a long time and are the built-in artifact storage mechanism for Azure Pipelines. Most builds that store non-package artifacts today would likely use this task. The task can push the content up to the server/cloud but can also copy the files to a local file share.

Pipeline Artifacts (published using the Publish Pipeline Artifact task are intended as the replacement for Build Artifacts. They are in preview right now and there are a few more things we need to do to reach parity. The benefit of Pipeline Artifacts is that they can dramatically reduce the time it takes to upload and download _large_ artifacts. We do this be first checking whether the content that is being uploaded exists in the service. We do this not just at the per-file level but also at the sub-file level (in up to 128K chunks). It can lead to really dramatic performance improvements.

Universal Packages - also in preview use the same storage/transfer technology as Pipeline Artifacts. You would use Universal Packages when you want to create an artifact with a life time independent of the pipeline that created it. You can download Pipeline Artifacts after a pipeline has completed via the artifacts UX - but if you want something that really exists independent of pipeline you would go for Universal Packages. There should be no performance difference between the two.

Hopefully this helps. Feel free to ask any more questions and I'll follow-up with answers.

Hi,
Thanks for that.
So, the fact that currently, a pipeline artifact can't be downloaded as a single zip and is not retrieved by a release pipeline "Download build artifacts" task are part of the temporary gaps which will be filled?

Thanks, @mitchdenny. Do pipeline artifacts suffer from the same permissions issue that build artifacts do? Namely, that github PRs from forks aren't allowed to upload them?

@afeblot ZIP download is coming, pretty high on the backlog. I think release pipeline support is already out, or coming very soon.

@AArnott yes, but that will also be fixed before they leave preview.

@afeblot Single-FIle download still works, so my "workaround" since its backlogged is to zip up my artifacts first before pipeline publishing, if my intent is to have them for an easy download for testing and whatnot. Not great but its there.

@mitchdenny Thanks for the information. I'm currently using Pipeline Artifacts to transfer stuff between jobs. Most of the stuff does not need to be persisted beyond the build though. Is there some way to "unpublish" Pipeline Artifacts?

Sorry for the delay in responding. I didn't see these. Download as Zip is done we just had a bug where we had to turn it off in the UX. Once that is fixed it will be available and will behave the same way as artifacts published via the Published Build Artifacts task. Similarly we are working on fixing the gaps which are stopping Pipeline Artifact download tasks automatically being injected into release pipelines. That work is underway right now (it does work already in some limited scenarios but we had some gaps).

@JeremyTCD we don't currently have a way to remove Pipeline Artifacts from a Pipeline run (can't do that with the old artifact type either). It is a good idea though let me think on that one a bit.

I just stumbled on that too. I noted the following differences:

  • a build artifact is contained in a folder named after the artifact name, and when you download it, all your stuff is in that folder. The pipeline artifact is not, allowing to transfer things from one job to another and having them extracted exactly at the same location.
  • a build artifact can be downloaded as a zip from the Azure GUI. A pipeline artifact can't

Just documenting that besides these differences, the old build artifacts are downloadable for public projects, but the new pipeline artifacts aren't. This might be related to the zip feature, given that the Artifact Explorer isn't available for anonymous access even for old build artifacts (would be nice to get it though).

Sorry for the delay in responding. I didn't see these. Download as Zip is done we just had a bug where we had to turn it off in the UX. Once that is fixed it will be available and will behave the same way as artifacts published via the Published Build Artifacts task. Similarly we are working on fixing the gaps which are stopping Pipeline Artifact download tasks automatically being injected into release pipelines. That work is underway right now (it does work already in some limited scenarios but we had some gaps).

@mitchdenny Any idea on timelines for this fix? We would love to have the feature to be able to download release artifacts.

Early 2019 - we're currently in a deployment freeze for the holidays but will be back at full speed in January.

I can't seem to find a way to link or use the artifact generated by Publish Pipeline Artifact task in a release pipeline. Is it possible?

For now you can insert the Download Pipeline Artifact task. We are making some enhancements to make auto-injection of download tasks more reliable across all artifact usage scenarios. We've done the work we are just waiting to deploy it (soon!).

For now you can insert the Download Pipeline Artifact task. We are making some enhancements to make auto-injection of download tasks more reliable across all artifact usage scenarios. We've done the work we are just waiting to deploy it (soon!).

The Download Pipeline Artifact task was stalling for me:

2019-01-15T01:54:59.5825130Z ##[section]Starting: Download Pipeline Artifact
2019-01-15T01:54:59.5828137Z ==============================================================================
2019-01-15T01:54:59.5828194Z Task         : Download Pipeline Artifact
2019-01-15T01:54:59.5828226Z Description  : Download Pipeline Artifact
2019-01-15T01:54:59.5828257Z Version      : 0.139.0
2019-01-15T01:54:59.5828325Z Author       : Microsoft Corporation
2019-01-15T01:54:59.5828358Z Help         : Download named artifact from a pipeline to a local path.
2019-01-15T01:54:59.5828389Z ==============================================================================
2019-01-15T01:54:59.9928757Z Download from the specified build: #142
2019-01-15T01:54:59.9928958Z Download artifact to: /home/vsts/work/r1/a
2019-01-15T01:55:04.0620411Z Information, Could not initialize dataport.
2019-01-15T01:55:04.0663733Z Information, Downloaded 0.0 MB out of 121.6 MB (0%).
2019-01-15T01:55:09.0652383Z Information, Downloaded 5.7 MB out of 121.6 MB (5%).
2019-01-15T01:55:14.0654811Z Information, Downloaded 5.7 MB out of 121.6 MB (5%).
2019-01-15T01:55:19.0657708Z Information, Downloaded 5.7 MB out of 121.6 MB (5%).
2019-01-15T01:55:24.0660477Z Information, Downloaded 5.7 MB out of 121.6 MB (5%).
2019-01-15T01:55:29.0663282Z Information, Downloaded 5.7 MB out of 121.6 MB (5%).
2019-01-15T01:55:34.0666061Z Information, Downloaded 5.7 MB out of 121.6 MB (5%).
2019-01-15T01:55:39.0668951Z Information, Downloaded 5.7 MB out of 121.6 MB (5%).
2019-01-15T01:55:44.0672298Z Information, Downloaded 5.7 MB out of 121.6 MB (5%).

With that last line continuing until my timeout hit. Hoping the updates are set to release soon!

@andrewkress sorry to hear you are having this problem. Could you provide some details about the org/team project/pipeline/build ID so we can take a closer look. If you prefer you can e-mail them to me at [email protected].

Yes - I am looking at that bug right now. We are waiting for one of our services to deploy and we should be able to validate the fix. Shouldn't be long now.

This docs issue has gone around the world and back it seems! I'm glad so many people have interest in our new(er) Pipeline Artifacts. I'm going to go ahead and close the conversation as a docs issue here. If you find that a change should be made to the docs here, please feel free to create a PR (we are always happy to review PRs!), or create another issue from the topic you think should change! Thanks everyone!

Similarly we are working on fixing the gaps which are stopping Pipeline Artifact download tasks automatically being injected into release pipelines

Hi @mitchdenny, this is affecting my team. Could you point me to the specific work item this refers to so I can track progress.

@JeremyTCD we don't currently have a way to remove Pipeline Artifacts from a Pipeline run (can't do that with the old artifact type either). It is a good idea though let me think on that one a bit.

Is there any updates on the unpublish functionality? Has this been raised as a feature request somewhere?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sevaa picture sevaa  Â·  3Comments

o-o00o-o picture o-o00o-o  Â·  3Comments

csutorasr picture csutorasr  Â·  3Comments

EM1L picture EM1L  Â·  3Comments

MJECloud picture MJECloud  Â·  3Comments