I’m trying to create a release azure pipeline that compresses a downloaded artifact (.zip file) directly on a local PC folder and then copy it into another.
I run the release pipeline and it completes successfully, but both folders are empty.
Here’s an example of one run logs:
I tried to see if the file is hidden but I didn’t find it. I also checked the permissions of both folders and ‘Everyone’ has full control on them.
Thanks in advance
2
Answers
Confusingly, the
Pipeline.Workspace
variable only works in YAML-based pipelines, not "classic" pipelines or "releases". You probably wantAgent.ReleaseDirectory
instead. Relevant docsThe Download Pipeline Artifact task is not needed. When you choose an artifact in the classic release pipeline, it will auto add a Download artifact task (this task in your release pipeline) and download the artifacts to
System.DefaultWorkingDirectory
(Same asAgent.ReleaseDirectory
andSystem.ArtifactsDirectory
). So, you can delete the Download Pipeline Artifact task.Pipeline.Workspace
is not a variable for the classic release pipeline. It is mentioned in the tips of this document. So, you can use theSystem.DefaultWorkingDirectory
in the Archive files task.The modified Archive files task:
The modified Copy files task:
My test result: