From 70749c454f723aeb0d6093187194cbead4e93a7c Mon Sep 17 00:00:00 2001 From: Gregory Marco Date: Fri, 31 Mar 2023 01:45:25 -0500 Subject: [PATCH] initial commit --- .drone.yml | 7 +++++++ Dockerfile | 2 ++ run | 9 +++++++++ 3 files changed, 18 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile create mode 100755 run diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..69c5756 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,7 @@ +pipeline: + build-plugin: + image: docker + commands: + - cat Dockerfile | docker build -t goat-deploy-plugin - + volumes: + - /var/run/docker.sock:/var/run/docker.sock diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0c30449 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM debian:latest +RUN apt-get update && apt-get -y install openssh-client diff --git a/run b/run new file mode 100755 index 0000000..3607719 --- /dev/null +++ b/run @@ -0,0 +1,9 @@ +#!/bin/sh +SOURCE=${PLUGIN_SOURCE:-.} +TARGET=$PLUGIN_TARGET + +mkdir /tmp/deploy +cp -Rv $SOURCE /tmp/deploy +echo "$DEPLOY_KEY" > /tmp/deploy.rsa +chmod 0600 /tmp/deploy.rsa +scp -i /tmp/deploy.rsa -o StrictHostKeyChecking=no -r /tmp/deploy/* $TARGET