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

This commit is contained in:
Giles Bradshaw 2020-04-26 14:34:46 +01:00
parent 496dc435c9
commit f080701eb8
4 changed files with 23 additions and 16 deletions

View File

@ -0,0 +1,7 @@
load("@this//:secret-to-environment.star", "secretToEnvironment")
def echoSecret(secret):
return 'echo "export {environment}=???" >> ***filename*** # {secret}'.format(
secret = secret,
environment = secretToEnvironment(secret), # .replace("-", "_").upper()
)

View File

@ -0,0 +1,7 @@
load("@this//:secret-to-environment.star", "secretToEnvironment")
def echo(secret):
return 'echo "export {environment}=${environment}" >> ***filename*** # {secret}'.format(
secret = secret,
environment = secretToEnvironment(secret), #secret.replace("-", "_").upper(),
)

View File

@ -0,0 +1,6 @@
load("@this//:secret-to-environment.star", "secretToEnvironment")
def export(secret):
return "export {toCaps}=${toCaps}".format(
toCaps = secretToEnvironment(secret), #secret.replace("-", "_").upper(),
)

View File

@ -1,23 +1,10 @@
load("@this//:map.star", "map")
load("@this//:from-secret.star", "fromSecret")
load("@this//:environment.star", "environment")
load("@this//:secret-to-environment.star", "secretToEnvironment")
load("@this//:echo.star", "echo")
load("@this//:export.star", "export")
load("@this//:echo-secret.star", "echoSecret")
def echo(secret):
return 'echo "export {environment}=${environment}" >> ***filename*** # {secret}'.format(
secret = secret,
environment = secretToEnvironment(secret), #secret.replace("-", "_").upper(),
)
def echoSecret(secret):
return 'echo "export {environment}=???" >> ***filename*** # {secret}'.format(
secret = secret,
environment = secretToEnvironment(secret), # .replace("-", "_").upper()
)
def export(secret):
return "export {toCaps}=${toCaps}".format(
toCaps = secretToEnvironment(secret), #secret.replace("-", "_").upper(),
)
def printSecrets(filename, env, secretEnv):
return {
"name": "print secrets",