Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions ci/initialize-build-host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,7 @@ then
$RSYNC -e "$RSH" $HOME/buildscripts $login:.
fi

# Copy the workspace. If there is no workspace defined, we are not in the
# job section yet.
echo Copy the workspace. If there is no workspace defined, we are not in the job section yet.
if [ -n "$WORKSPACE" ]
then
$RSH $login rm -rf "$WORKSPACE_REMOTE" || true
Expand All @@ -383,7 +382,18 @@ then
exit 2
fi
$RSH $login mkdir -p "$WORKSPACE_REMOTE"
$RSYNC -e "$RSH" "$WORKSPACE"/ $login:"$WORKSPACE_REMOTE"/
echo "Copying the workspace to the build host"
start_spinner 600
if $RSYNC -e "$RSH" "$WORKSPACE"/ $login:"$WORKSPACE_REMOTE"/; then
stop_spinner
echo "Finished copying the workspace to the build host"
else
EXIT_CODE=$?
echo "error: Failed to copy the workspace to the build host"
stop_spinner
exit $EXIT_CODE
fi
stop_spinner
fi

# --------------------------------------------------------------------------
Expand All @@ -399,11 +409,12 @@ then
# --------------------------------------------------------------------------
# Collect artifacts and cleanup.
# --------------------------------------------------------------------------
# Copy the workspace back after job has ended.
echo Copy the workspace back after job has ended.
if [ -n "$WORKSPACE" ]
then
# This can take a very long time. So we need to prevent timeouts
start_spinner 600
echo "Copying the workspace back after job has ended"
if $RSYNC -e "$RSH" $login:"$WORKSPACE_REMOTE"/ "$WORKSPACE"/; then
stop_spinner
echo "Finished copying the workspace back after job has ended"
Expand Down
Loading