From b24d8aa47dba412c6ef242a15b3a8411a8255ccb Mon Sep 17 00:00:00 2001 From: Sam Therapy Date: Thu, 17 Nov 2022 15:44:58 +0100 Subject: [PATCH] [SKIP CI] use less annoying clone Signed-off-by: Sam Therapy --- .drone.yml | 59 +++++++++++++++++++++++++----------------------- add-froth-key.sh | 17 -------------- 2 files changed, 31 insertions(+), 45 deletions(-) delete mode 100644 add-froth-key.sh diff --git a/.drone.yml b/.drone.yml index 939a5b8a..91c49261 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,36 +2,39 @@ kind: pipeline type: docker name: Deploy +clone: + disable: true + steps: -- name: submodules - image: alpine/git - commands: - - git submodule update --init --recursive + - name: Clone + image: woodpeckerci/plugin-git + settings: + recursive: true -- name: Build - depends_on: - - submodules - image: node:16 - commands: - - yarn - - yarn build - when: - event: - - push + - name: Build + depends_on: + - submodules + image: node:16 + commands: + - yarn + - yarn build + when: + event: + - push -- name: Execute deploy script - depends_on: - - Build - image: ubuntu:latest - environment: + - name: Execute deploy script + depends_on: + - Build + image: ubuntu:latest + environment: SSH_KEY: from_secret: SSH_KEY - commands: - - apt update && apt install -y openssh-client rsync - - ./ci/add-key.sh - - ./ci/deploy.sh - when: - event: - - push - branch: - - froth \ No newline at end of file + commands: + - apt update && apt install -y openssh-client rsync + - ./ci/add-key.sh + - ./ci/deploy.sh + when: + event: + - push + branch: + - froth diff --git a/add-froth-key.sh b/add-froth-key.sh deleted file mode 100644 index 64614f90..00000000 --- a/add-froth-key.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# only execute this script as part of the pipeline. -[ -z "$CI" ] && echo "missing ci environment variable" && exit 2 - -# only execute the script when github token exists. -[ -z "$SSH_KEY" ] && echo "missing ssh key" && exit 3 - -# write the ssh key. -mkdir /root/.ssh -echo -n "${SSH_KEY}" > /root/.ssh/id_ed25519 -chmod 600 /root/.ssh/id_ed25519 - -# add froth.zone to our known hosts. -touch /root/.ssh/known_hosts -chmod 600 /root/.ssh/known_hosts -ssh-keyscan -H froth.zone > /etc/ssh/ssh_known_hosts 2> /dev/null