commit 70749c454f723aeb0d6093187194cbead4e93a7c Author: Gregory Marco Date: Fri Mar 31 01:45:25 2023 -0500 initial commit 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