Giles Bradshaw 1 year ago
parent
commit
ecbc7195e3
2 changed files with 7 additions and 5 deletions
  1. +5
    -0
      drone-starlark/repos/environment.star
  2. +2
    -5
      drone-starlark/repos/print-secrets.star

+ 5
- 0
drone-starlark/repos/environment.star View File

@@ -0,0 +1,5 @@
load("@this//:from-secret.star", "fromSecret")
def environment(env):
return dict(
[(x.replace("-", "_").upper(), fromSecret(x)) for x in env]
)

+ 2
- 5
drone-starlark/repos/print-secrets.star View File

@@ -1,10 +1,7 @@
load("@this//:map.star", "map")
load("@this//:from-secret.star", "fromSecret")
def environment(env):
return dict(
[(x.replace("-", "_").upper(), fromSecret(x)) for x in env]
)
load("@this//:environment", "environment")

def secretToEnvironment(secret):
return secret.replace("-", "_").upper()