0
votes

I am trying to run a Release Job on Azure Dev ops.

I have 4 tasks:

enter image description here

I am using Archive Remote Folder to create a 7zip backup of the deployment folder. This one in comparison to the Archive Files task let's you exclude filetypes.

My issue comes during archive, this is the error message:

enter image description here

I have tried adding 7zip to the environment variables, but still the same. I was thinking maybe just run a local powershell task to do the archive where I can add the quotes to the location in Program Files where 7zip is located.

Funny enough, I have the same setup for two boxes, but this runs fine on the first one.

What should I check?

Thank you.

2

2 Answers

0
votes

Unlike the official Archive Files task, Archive Remote Folder Task which is a 3rd-party extension released by community contributor.

Have also installed and tested this task, but could not reproduce same error in our environment.

According to the tutorial of this task in marketplace, you need to follow below requirements:

  • Your remote server must have WinRM enabled and configured.
  • Your remote server must have 7z installed.

'C:\Program' is not a recognized as a internal or external command This looks like your local path C:\Program Files\xx include whitespace be treated as part of command line.

Since the latest update of Archive Remote Folder Task is 11/17/2016, I don't think it's a good idea to file a bug to the author.

As you have pointed out in the question, you could just run a local powershell task to do the archive. Another choice is writing your own extension task to handle the process, you could take a look at the both open source codes of Archive Remote Folder Task and Archive Files task.

0
votes

@PatrickLu-MSFT

Yep, that's what I figured. I have no idea how the path to the 7z exe was not treated as string. What I did in the end was to create my own powershell wrapper function around 7z and archive it that way. It all went smoothly from there.