Skip to content

Commit db305a4

Browse files
Merge pull request #2384 from craigcomstock/ent-14385/master
Adjusted initialize-build-host to be more verbose about copying the workspace to and from the build host
2 parents 1865b63 + bf86599 commit db305a4

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

‎ci/initialize-build-host.sh‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,7 @@ then
371371
$RSYNC -e "$RSH" $HOME/buildscripts $login:.
372372
fi
373373

374-
# Copy the workspace. If there is no workspace defined, we are not in the
375-
# job section yet.
374+
echo Copy the workspace. If there is no workspace defined, we are not in the job section yet.
376375
if [ -n "$WORKSPACE" ]
377376
then
378377
$RSH $login rm -rf "$WORKSPACE_REMOTE" || true
@@ -383,7 +382,17 @@ then
383382
exit 2
384383
fi
385384
$RSH $login mkdir -p "$WORKSPACE_REMOTE"
386-
$RSYNC -e "$RSH" "$WORKSPACE"/ $login:"$WORKSPACE_REMOTE"/
385+
echo "Copying the workspace to the build host"
386+
start_spinner 600
387+
if $RSYNC -e "$RSH" "$WORKSPACE"/ $login:"$WORKSPACE_REMOTE"/; then
388+
stop_spinner
389+
echo "Finished copying the workspace to the build host"
390+
else
391+
EXIT_CODE=$?
392+
echo "error: Failed to copy the workspace to the build host"
393+
stop_spinner
394+
exit $EXIT_CODE
395+
fi
387396
fi
388397

389398
# --------------------------------------------------------------------------
@@ -399,11 +408,12 @@ then
399408
# --------------------------------------------------------------------------
400409
# Collect artifacts and cleanup.
401410
# --------------------------------------------------------------------------
402-
# Copy the workspace back after job has ended.
411+
echo Copy the workspace back after job has ended.
403412
if [ -n "$WORKSPACE" ]
404413
then
405414
# This can take a very long time. So we need to prevent timeouts
406415
start_spinner 600
416+
echo "Copying the workspace back after job has ended"
407417
if $RSYNC -e "$RSH" $login:"$WORKSPACE_REMOTE"/ "$WORKSPACE"/; then
408418
stop_spinner
409419
echo "Finished copying the workspace back after job has ended"

0 commit comments

Comments
 (0)