skip to Main Content

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.

Release pipeline overview

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


  1. Confusingly, the Pipeline.Workspace variable only works in YAML-based pipelines, not "classic" pipelines or "releases". You probably want Agent.ReleaseDirectory instead. Relevant docs

    Login or Signup to reply.
    1. The 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 enter image description here task in your release pipeline) and download the artifacts to System.DefaultWorkingDirectory(Same as Agent.ReleaseDirectory and System.ArtifactsDirectory). So, you can delete the Download Pipeline Artifact task.

    2. Pipeline.Workspace is not a variable for the classic release pipeline. It is mentioned in the tips of this document. So, you can use the System.DefaultWorkingDirectory in the Archive files task.

    If you are using classic release pipelines, you can use classic releases and artifacts variables to store and access data throughout your pipeline.

    The modified Archive files task:

    enter image description here

    The modified Copy files task:

    enter image description here

    My test result:

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search