.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
f080701eb8
commit
9d4b012ae9
27
.drone.star
27
.drone.star
|
@ -1,29 +1,12 @@
|
|||
load("@this//:from-secret.star", "fromSecret")
|
||||
load("@this//:print-secrets.star", "printSecrets")
|
||||
|
||||
def environment(env):
|
||||
return dict(
|
||||
[(x.replace("-", "_").upper(), fromSecret(x)) for x in env]
|
||||
)
|
||||
def map(fn, l):
|
||||
return [fn(x) for x in l]
|
||||
def secretToEnvironment(secret):
|
||||
return secret.replace("-", "_").upper()
|
||||
def echo(secret):
|
||||
return 'echo "export {environment}=${environment}" >> ***filename*** # {secret}'.format(
|
||||
secret = secret,
|
||||
environment = secret.replace("-", "_").upper(),
|
||||
)
|
||||
def echoSecret(secret):
|
||||
return 'echo "export {environment}=???" >> ***filename*** # {secret}'.format(
|
||||
secret = secret,
|
||||
environment = secret.replace("-", "_").upper()
|
||||
)
|
||||
load("@this//:map.star", "map")
|
||||
load("@this//:environment.star", "environment")
|
||||
load("@this//:echo.star", "echo")
|
||||
load("@this//:export.star", "export")
|
||||
load("@this//:echo-secret.star", "echoSecret")
|
||||
|
||||
def export(secret):
|
||||
return "export {toCaps}=${toCaps}".format(
|
||||
toCaps = secretToEnvironment(secret),
|
||||
)
|
||||
def wait(delay, name):
|
||||
return {
|
||||
"name": name,
|
||||
|
|
Reference in New Issue