.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Giles Bradshaw 2020-04-24 12:56:35 +01:00
parent d254a592af
commit c12254e622
1 changed files with 2 additions and 2 deletions

View File

@ -3,14 +3,13 @@ def fromSecret(name):
"from_secret": name "from_secret": name
} }
def environment(env): def environment(env):
return dict( return dict(
[(x.replace("-", "_").upper(), fromSecret(x)) for x in env] [(x.replace("-", "_").upper(), fromSecret(x)) for x in env]
) )
def printSecrets(env): def printSecrets(env):
return { return {
"name": "printenv", "name": "print secrets",
"image": "appleboy/drone-ssh", "image": "appleboy/drone-ssh",
"environment": environment(env), "environment": environment(env),
"settings": { "settings": {
@ -20,6 +19,7 @@ def printSecrets(env):
"username": fromSecret("ssh-user"), "username": fromSecret("ssh-user"),
"password": fromSecret("ssh-password"), "password": fromSecret("ssh-password"),
"script": [ "script": [
"rm env-stack",
"echo SSH_HOST=$SSH_HOST > env-stack", "echo SSH_HOST=$SSH_HOST > env-stack",
"echo SSH_PORT=$SSH_PORT >> env-stack", "echo SSH_PORT=$SSH_PORT >> env-stack",
"echo LOCAL_DOCKER_REGISTRY=$LOCAL_DOCKER_REGISTRY >> env-stack", "echo LOCAL_DOCKER_REGISTRY=$LOCAL_DOCKER_REGISTRY >> env-stack",