.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
777aeefcf3
commit
7d41b846b5
23
.drone.star
23
.drone.star
|
@ -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):
|
||||
|
|
Reference in New Issue