We're running into an issue with the Azure Copy Files task on Azure DevOps. We've tried using version 3.* and 4.*. We do not use ampersands in our variables. It seems that the task is failing on the -containerSasToken variable, which we have no control over. It succesfully copies everything to blob, but when it starts copying to the VM the following errors occur:
2020-06-10T10:34:15.6572519Z ##[error]Execution of remote script job failed. ComputerName: '###', Message: 'Exception calling "Create" with "1" argument(s): "At line:12 char:297
+ ... n Sync Service - DEVELOP' -containerSasToken '?sv=2015-04-05&sr=c&sig ...
+ ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
At line:12 char:302
+ ... c Service - DEVELOP' -containerSasToken '?sv=2015-04-05&sr=c&sig=IRc3 ...
+ ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
At line:12 char:357
+ ... &sr=c&sig=IRc3wRXJkxsNXMvF%2FbklPRBhelc1qY2%2BDfCVKj2xBlk%3D&se=2020- ...
+ ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
At line:12 char:385
+ ... FbklPRBhelc1qY2%2BDfCVKj2xBlk%3D&se=2020-06-10T14%3A34%3A08Z&sp=rwdl' ...
+ ~
The ampersand (&) character is not allowed. The & operator is reserved for future use; wrap an ampersand in double quotation marks ("&") to pass it as part of a string.
At line:12 char:8105033
+ ... tqBTFKkFalM7qofnRBLTVr0rsI6yuGNFCoXwvAAAAAAA=' -CleanTargetBeforeCopy
+ ~~~~~~~~~~~~~~~~~~~~~~~~
The string is missing the terminator: '."'
2020-06-10T10:34:15.7919052Z ##[section]Finishing: Copy files
It used to run without a problem on version 1.*. But we have to upgrade because we're going to use service principals now. Anyone have a clue what might be going wrong here?