Commit a8114ed8 authored by cpomies's avatar cpomies
Browse files

Minor changed

Try to fix problem with rsync in Jenkins's master node
parent c65d504c
......@@ -5,7 +5,12 @@ function get_config_file {
exit 1
fi
lbn-manage-rsync --verbose --get-config --progress --source "${RSYNC_DIR}" --destination "${ARTIFACTS_DIR}"
SOURCES="${RSYNC_DIR}"
if [ -d "${RSYNC_WORKDIR}" ] ; then
SOURCES="${RSYNC_WORKDIR}"
fi
lbn-manage-rsync --verbose --get-config --source "${SOURCES}" --destination "${ARTIFACTS_DIR}"
if [ -e ${ARTIFACTS_DIR}/${slot}.json ] ; then
export config_file=${ARTIFACTS_DIR}/${slot}.json
......
......@@ -5,7 +5,7 @@ function get_sources {
exit 1
fi
lbn-manage-rsync --verbose --get-sources --progress --source "${RSYNC_DIR}" --destination "${ARTIFACTS_DIR}"
lbn-manage-rsync --verbose --get-sources --source "${RSYNC_DIR}" --destination "${ARTIFACTS_DIR}"
export GET_SOURCES="true"
......
......@@ -5,6 +5,6 @@ function push_artifact {
exit 1
fi
lbn-manage-rsync --verbose --progress --source "${ARTIFACTS_DIR}" --destination "${RSYNC_DIR}"
lbn-manage-rsync --verbose --source "${ARTIFACTS_DIR}" --destination "${RSYNC_DIR}"
}
......@@ -1008,7 +1008,7 @@ string(REPLACE "$${NIGHTLY_BUILD_ROOT}" "$${CMAKE_CURRENT_LIST_DIR}"
self.retcode = 0
def run(self):
self.retcode = execute_rsync(self.script.artifacts_dir + '/',
self.retcode = execute_rsync(self.script.artifacts_dir,
self.script.options.rsync_dest)
def wait(self):
'''
......
......@@ -36,8 +36,8 @@ def execute_rsync(src, dest, includes = [], excludes = [], extra_param = []):
for exclude in excludes:
cmd.append('--exclude=%s' % exclude)
cmd.append(src)
cmd.append(dest)
cmd.append(src + '/')
cmd.append(dest + '/')
# create destination directory, if missing
if ':' in dest:
......@@ -71,12 +71,12 @@ class Script(LbUtils.Script.PlainScript):
action='store_true',
dest='get_sources',
help='Synchronize sources files')
'''
self.parser.add_option('--progress',
action='store_true',
dest='progress',
help='Shows progress during rsync')
'''
self.parser.add_option('-d', '--destination',
action='store',
help='Destination folder')
......@@ -118,11 +118,11 @@ class Script(LbUtils.Script.PlainScript):
includes_param.append("checkout_job_url.txt")
excludes_param = ["*"]
if opts.progress:
if self.log.level <= logging.INFO:
extra_param = ['--progress']
return execute_rsync(
opts.source + '/',
opts.source,
opts.destination,
includes_param,
excludes_param,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment