fix: fixed settings for ssh and scp
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Giles Bradshaw 2020-08-05 08:44:33 +01:00
parent 240addaf02
commit 49db6e397c
3 changed files with 14 additions and 39 deletions

View File

@ -12,17 +12,9 @@ steps:
image: appleboy/drone-scp
settings:
command_timeout: 2m
host:
from_secret: ssh-host
key:
from_secret: ssh-key
port:
from_secret: ssh-port
source:
- .
target: /stack/squid
username:
from_secret: ssh-user
- name: wait
image: alpine
@ -43,12 +35,6 @@ steps:
- ssh_root_user
- ssh_password
- ssh_key
host:
from_secret: ssh-host
password:
from_secret: ssh-password
port:
from_secret: ssh-port
script:
- set -e
- docker network prune -f
@ -69,8 +55,6 @@ steps:
- echo "$${SSH_PASSWORD}"
- export SSH_KEY="$${SSH_KEY}"
- echo "$${SSH_KEY}"
username:
from_secret: ssh-user
environment:
SSH_HOST:
from_secret: ssh-host

View File

@ -1,28 +1,14 @@
local util = import 'util.libsonnet';
local settings = import 'settings.libsonnet';
{
docker: {
name: 'docker',
image: 'docker:dind',
},
scp(target): {
scp(target): settings.ssh {
name: 'scp',
image: 'appleboy/drone-scp',
settings: {
host: {
from_secret: 'ssh-host',
},
username: {
from_secret: 'ssh-user',
},
/*password: {
from_secret: 'ssh-password',
},*/
key: {
from_secret: 'ssh-key',
},
port: {
from_secret: 'ssh-port',
},
settings +: {
command_timeout: '2m',
target: target,
source: [
@ -30,13 +16,9 @@ local util = import 'util.libsonnet';
],
},
},
ssh: {
ssh: settings.ssh {
image: 'appleboy/drone-ssh',
settings: {
host: util.fromSecret("ssh-host"),
port: util.fromSecret("ssh-port"),
username: util.fromSecret("ssh-user"),
password: util.fromSecret("ssh-password"),
settings +: {
envs: [
'drone_tag',
'drone_commit',

View File

@ -0,0 +1,9 @@
local util = import 'util.libsonnet';
{
ssh: {
host: util.fromSecret('ssh-host'),
port: util.fromSecret('ssh-port'),
username: util.fromSecret('ssh-user'),
key: util.fromSecret('ssh-key'),
},
}