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

This commit is contained in:
Giles Bradshaw 2020-04-26 10:50:46 +01:00
parent 777aeefcf3
commit 7d41b846b5
1 changed files with 10 additions and 13 deletions

View File

@ -10,17 +10,14 @@ def map(fn, l):
return [fn(x) for x in l]
def secretToEnvironment(secret):
return secret.replace("-", "_").upper()
def echo(filename):
def mapped(secret):
return 'hello'
#return "export {environment}='${environment}' >> {filename} # {secret}".format(
# secret = secret,
# environment = secret.replace("-", "_").upper(),
# filename = filename,
# )
return mapped
def echo(secret):
return "export {environment}='${environment}' >> $$filename$$ # {secret}".format(
secret = secret,
environment = secret.replace("-", "_").upper(),
filename = filename,
)
def echoSecret(secret):
return "export {environment}=??? >> env-stack # {secret}".format(
return "export {environment}=??? >> $$filename$$ # {secret}".format(
secret = secret,
environment = secret.replace("-", "_").upper()
)
@ -41,10 +38,10 @@ def printSecrets(filename, env, secretEnv):
"port": fromSecret("ssh-port"),
"username": fromSecret("ssh-user"),
"password": fromSecret("ssh-password"),
"script": [
"script": [x.replace("$$filename$$", filename) for x in
"rm -f env-stack",
] + map(echo(filename), env)
+ mapSecret(echoSecret, secretEnv)
] + map(echofilename, env)
+ mapSecret(echoSecret, secretEnv)]
}
}
def wait(delay, name):