.
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//:from-secret.star", "fromSecret")
|
||||||
load("@this//:print-secrets.star", "printSecrets")
|
load("@this//:print-secrets.star", "printSecrets")
|
||||||
|
|
||||||
def environment(env):
|
load("@this//:map.star", "map")
|
||||||
return dict(
|
load("@this//:environment.star", "environment")
|
||||||
[(x.replace("-", "_").upper(), fromSecret(x)) for x in env]
|
load("@this//:echo.star", "echo")
|
||||||
)
|
load("@this//:export.star", "export")
|
||||||
def map(fn, l):
|
load("@this//:echo-secret.star", "echoSecret")
|
||||||
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()
|
|
||||||
)
|
|
||||||
|
|
||||||
def export(secret):
|
|
||||||
return "export {toCaps}=${toCaps}".format(
|
|
||||||
toCaps = secretToEnvironment(secret),
|
|
||||||
)
|
|
||||||
def wait(delay, name):
|
def wait(delay, name):
|
||||||
return {
|
return {
|
||||||
"name": name,
|
"name": name,
|
||||||
|
|
Reference in New Issue