Jenkinsfile_Common: Reduce logs from rsync command

The "*" is expanded when the script is running on jenkins and the SRC is
local files. This expansion is hundreds of files, leading to hundreds of
lines in the jenkins logs. We don't need these lines.

BugzID: 75217
This commit is contained in:
Alexandre Bard 2021-10-12 15:52:49 +02:00
parent 2ada8afbf8
commit e3cf8861d0
1 changed files with 5 additions and 1 deletions

View File

@ -170,7 +170,11 @@ def syncSources(src, dst) {
} }
sshagent (credentials: ['7767e711-08a4-4c71-b080-197253dd7392']) { sshagent (credentials: ['7767e711-08a4-4c71-b080-197253dd7392']) {
sh "rsync -q -auvz --ignore-existing -e \"ssh\" ${from}/* ${to}" # When the SRC is local, we want to avoid "*" expansion
if (hasSrcUrl)
sh "rsync -q -auvz --ignore-existing -e \"ssh\" ${from}/* ${to}"
else
sh "rsync -q -auvz --ignore-existing -e \"ssh\" $(find ${from} -maxdepth 1) ${to}"
} }
} }