sandcastle-ng

Scripts for the deployment of Sandcastle (GNU Taler)
Log | Files | Refs | README

job.sh (625B)


      1 #!/bin/bash
      2 set -exuo pipefail
      3 
      4 ARTIFACT_PATH="/artifacts/sandcastle-ng/${CI_COMMIT_REF}/*.tar"
      5 
      6 RSYNC_HOST="firefly.gnunet.org"
      7 RSYNC_PORT=22
      8 RSYNC_PATH="incoming"
      9 RSYNC_USER="taler-head"
     10 RSYNC_DEST="${RSYNC_USER}@${RSYNC_HOST}:${RSYNC_PATH}"
     11 
     12 # Useful to print for debug
     13 ls -alh $(dirname ${ARTIFACT_PATH})
     14 
     15 ## We need ssh and rsync
     16 apt-get update -yqq
     17 apt-get install -yqq --no-install-recommends \
     18 	ssh-client rsync
     19 
     20 # Send our container tarball to the host
     21 rsync -vP \
     22       --port ${RSYNC_PORT} \
     23       ${ARTIFACT_PATH} ${RSYNC_DEST} || (rm -f ${ARTIFACT_PATH} && exit 1)
     24 
     25 # Make sure we cleanup
     26 rm -f ${ARTIFACT_PATH}