After a deployment in linux server from azure devops, I am want to copy a log file from linux server and display in azure devops.In ssh task i tried the following command echo ##vso[task.uploadfile]/xxx/xxxxxx/xxxxx/log/xxxxxx/console-20200625.log
the task is successful but can't find the log file.
0
votes
1 Answers
0
votes
UploadFile: Upload a file that can be downloaded with task logs: ##vso[task.uploadfile]local file path
task.uploadfile
is to upload a local file to the pipeline. Since you are using a self-hosted windows agent,so the file on the linux server is not uploaded.
As workaround , you can try to use Remote Copy task to copy the file from linux server to your self-hosted agent. Then upload this file from the local agent.
In Remote Copy task, you can specify the remote machine IP address in the Remote Machine
field and the destination path for copy in the Destination
field. It can be on local machine or on remote machine.
scp /xxx/xxxxxx/xxxxx/log/xxxxxx/console-20200625.log [email protected]:/C:/Users/xxxx
. i tried SCP as well but got connection refused error – Sar