git - drone - ghost - guacamole - rocket chat https://sigyl.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 
 

25 lines
822 B

  1. load("@this//:map.star", "map")
  2. load("@this//:from-secret.star", "fromSecret")
  3. load("@this//:environment.star", "environment")
  4. load("@this//:echo.star", "echo")
  5. load("@this//:export.star", "export")
  6. load("@this//:echo-secret.star", "echoSecret")
  7. def printSecrets(filename, env, secretEnv):
  8. return {
  9. "name": "print secrets",
  10. "image": "appleboy/drone-ssh",
  11. "environment": environment(env + secretEnv),
  12. "settings": {
  13. "envs": [x.replace("-", "_") for x in env + secretEnv ],
  14. "host": fromSecret("ssh-host"),
  15. "port": fromSecret("ssh-port"),
  16. "username": fromSecret("ssh-user"),
  17. "password": fromSecret("ssh-password"),
  18. "script": [x.replace("***filename***", filename) for x in [
  19. "rm -f env-stack",
  20. ] + map(echo, env)
  21. + map(echo, secretEnv)]
  22. }
  23. }