25 lines
827 B
Plaintext
25 lines
827 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 + secretEnv),
|
|
"settings": {
|
|
"envs": [x.replace("-", "_") for x in env + secretEnv ],
|
|
"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 ***filename***",
|
|
] + map(echo, env)
|
|
+ map(echo, secretEnv)]
|
|
}
|
|
}
|