25 lines
804 B
Plaintext
25 lines
804 B
Plaintext
load("@this//:map.star", "map")
|
|
load("@this//:from-secret.star", "fromSecret")
|
|
load("@this//:environment.star", "environment")
|
|
load("@this//:echo.star", "echo")
|
|
load("@this//:export.star", "export")
|
|
load("@this//:echo-secret.star", "echoSecret")
|
|
|
|
def printSecrets(filename, env, secretEnv):
|
|
return {
|
|
"name": "print secrets",
|
|
"image": "appleboy/drone-ssh",
|
|
"environment": environment(env),
|
|
"settings": {
|
|
"envs": [x.replace("-", "_") for x in env ],
|
|
"host": fromSecret("ssh-host"),
|
|
"port": fromSecret("ssh-port"),
|
|
"username": fromSecret("ssh-user"),
|
|
"password": fromSecret("ssh-password"),
|
|
"script": [x.replace("***filename***", filename) for x in [
|
|
"rm -f env-stack",
|
|
] + map(echo, env)
|
|
+ map(echoSecret, secretEnv)]
|
|
}
|
|
}
|