.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
d254a592af
commit
c12254e622
|
@ -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",
|
||||||
|
|
Reference in New Issue