diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 51fbb10..164412e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 - diff --git a/docker/Dockerfile b/docker/Dockerfile index 37ca316..5ad9c17 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -4,6 +4,7 @@ RUN apk add --no-cache \ ansible \ mktorrent \ openssh-client \ + rsync \ squashfs-tools ARG PACKER_VERSION