From ece961ed004b1409b885031fe8fe3d62adc0207a Mon Sep 17 00:00:00 2001 From: Giles Bradshaw Date: Tue, 28 Jul 2020 15:32:32 +0100 Subject: [PATCH] scp step --- .drone-home.jsonnet | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/.drone-home.jsonnet b/.drone-home.jsonnet index 155a19f..dae1907 100644 --- a/.drone-home.jsonnet +++ b/.drone-home.jsonnet @@ -1,7 +1,31 @@ local images = { docker: { + name: 'docker', image: 'docker:dind', }, + scp(target): { + name: 'scp', + image: 'appleboy/drone-scp', + settings: { + host: { + from_secret: 'ssh-host', + }, + username: { + from_secret: 'ssh-user', + }, + password: { + from_secret: 'ssh-password', + }, + port: { + from_secret: 'ssh-port', + }, + command_timeout: '2m', + target: target, + source: [ + '.', + ], + }, + }, }; [ { @@ -14,7 +38,6 @@ local images = { }, services: [ images.docker { - name: 'docker', privileged: true, volumes: [ { @@ -46,7 +69,9 @@ local images = { }, }, ], - steps:[], + steps:[ + images.scp('/stack/root'), + ], } ]