This is the error message I got when I ran the pipeline in Azure Devops:
The syntax of the command is incorrect. The system cannot find the file specified. ##[error]Cmd.exe exited with code '1'.
I can't tell what is wrong with the Yaml script
- script: | # Build your HTML and CSS files (No actual compilation, just copying)
mkdir -p $(Build.BinariesDirectory)/website
copy -R * $(Build.BinariesDirectory)/website/
displayName: 'Copy Website Files'
The problem is that you are using the Windows agent to run the linux copy command.
And according to my test the
copy -Rcommand is not valid in linux. We need to usecp -R. Reference this thread for more information : https://unix.stackexchange.com/questions/18712/difference-between-cp-r-and-cp-r-copy-commandThe following Yaml works for me: