When trying to use it in a release, I get the following error:
##[error]This task must run in a build to publish artifacts to Azure Pipelines/TFS.
which seems in contradiction with the initial sentence Use this task in a build or release pipeline..
Is it an error in the documentation, or are there limitations?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
As of now, Publish build artifacts tasks can be used only in build pipelines.
If I'm right, I should prefer using PublishPipelineArtifact, shouldn't I?
A message with a link in the documentation would help.
Then I think that we could close this issue.
I believe we updated the text here, thanks Roopesh! @fleed, are you saying a blurb with "if you want to use this in a release pipeline, use Pipeline Artifacts instead." would be helpful? Adding @vijayma to confirm that if you want to publish in a release pipeline, you must use Pipeline Artifacts.
@elbatk it seems that even the other task doesn‘t work in a release pipeline
so is there a way to publish artifacts that are generated from a RELEASE (not build) pipeline?
I want to be able to create an output file in stage 1, then download that in stage 2 and deploy directly the image verses creating an image from scratch in each stage...
@DavidNewby Thanks for the questions. I believe the PublishPipelined Artifacts Should work for release Pipelines. If you having issues there, you should open a new issue under that page or reach out to the Developer Community. I'll be closing this issue for now :)