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

This commit is contained in:
Giles Bradshaw 2020-08-05 08:49:09 +01:00
parent 49db6e397c
commit 032c77497c
2 changed files with 22 additions and 4 deletions

View File

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

View File

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