Test deployment with rsync

This commit is contained in:
jalr 2018-03-18 02:58:23 +01:00
parent 7df2303dea
commit 9831e4878e
2 changed files with 8 additions and 4 deletions

View file

@ -11,14 +11,13 @@ stages:
- prepare
- build
- torrent
# - deploy
#
services:
- docker:dind
before_script:
- docker info
- apk add --no-cache make
- apk add --no-cache make openssh-client rsync
dockerimage:
stage: prepare
@ -33,10 +32,14 @@ squashfs:
stage: build
script:
- make images/debian-stretch.squashfs
- echo "$rsa_labsync_raven" > /dev/shm/id_rsa && chmod 600 /dev/shm/id_rsa
- mkdir -p $HOME/.ssh && echo "$hostkeys_raven" >> $HOME/.ssh/known_hosts
- ssh -i /dev/shm/id_rsa labsync@raven.lab.fablab-nea.de "mkdir -p /opt/docker/tftpgen/labsync/${CI_BUILD_REF_NAME}/${CI_PIPELINE_ID}/images/" || true
- rsync -av -e "ssh -l labsync -i /dev/shm/id_rsa" images/ raven.lab.fablab-nea.de:/opt/docker/tftpgen/labsync/${CI_BUILD_REF_NAME}/${CI_PIPELINE_ID}/images/ || true
- ssh -i /dev/shm/id_rsa labsync@raven.lab.fablab-nea.de "cd /opt/docker/tftpgen && make labsync.cfg" || true
artifacts:
paths:
- images
expire_in: 2 weeks
tags:
- fablab

View file

@ -4,6 +4,7 @@ RUN apk add --no-cache \
ansible \
mktorrent \
openssh-client \
rsync \
squashfs-tools
ARG PACKER_VERSION