Skip to content

Commit

Permalink
Explicitly use ssh for rsync communication
Browse files Browse the repository at this point in the history
  • Loading branch information
gjanssens committed Aug 23, 2019
1 parent f894a25 commit dc4fb89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion buildserver/build_package.ps1
Expand Up @@ -144,6 +144,6 @@ bash-command -command "echo Build Ended $time_stamp >> $log_unix"
if ($hostname) {
bash-command -command "$script_unix/buildserver/upload_build_log.sh $log_unix $hostname $log_dir $branch"
if ($new_file) {
bash-command -command "rsync -a $setup_file $hostname/$branch"
bash-command -command "rsync -e ssh -a $setup_file $hostname/$branch"
}
}
8 changes: 4 additions & 4 deletions buildserver/upload_build_log.sh
Expand Up @@ -23,7 +23,7 @@ function create_remote_dir()
# For this hack $base_dir is just an arbitrary existing directory
# It doesn't matter which one
# No files will be copied from it anyway because of the exclude parameter
rsync -a --exclude='*' "$base_dir"/ "$1"
rsync -e ssh -a --exclude='*' "$base_dir"/ "$1"
fi
}

Expand All @@ -37,7 +37,7 @@ then
# the final remote directory to store it
# So let's just store it in the top-level so we have a trace
# of the build start or very early failures
rsync -a "$log_file" "$host"/build-logs
rsync -e ssh -a "$log_file" "$host"/build-logs
else
# Now the subdirectory to store the log file is is known
# In addition group per month to simplify navigation even more
Expand All @@ -46,14 +46,14 @@ then
create_remote_dir "$host"/build-logs/$remote_branch_dir
create_remote_dir "$host"/build-logs/$remote_branch_dir/$month_part

rsync -a "$log_file" "$host"/build-logs/$remote_branch_dir/$month_part
rsync -e ssh -a "$log_file" "$host"/build-logs/$remote_branch_dir/$month_part

# Finally remove the initially start build log uploaded earlier
# Disable fatal error handling though to prevent the complete script from exiting
# if no early build log exists
echo "Removing initial startup build log uploaded earlier"
set +ex
rsync -rv --delete --include="$(basename $log_file)" --exclude='*' "$base_dir"/ "$host"/build-logs/
rsync -e ssh -rv --delete --include="$(basename $log_file)" --exclude='*' "$base_dir"/ "$host"/build-logs/
set -ex
fi
fi

0 comments on commit dc4fb89

Please sign in to comment.