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

This commit is contained in:
Giles Bradshaw 2020-04-24 11:29:25 +01:00
parent 355009f2f1
commit c07c78f4ce
1 changed files with 35 additions and 0 deletions

View File

@ -1,3 +1,37 @@
def fromSecret(name):
return {
"from_secret": name
}
def printenv():
return {
"name": "printenv",
"image": "appleboy/drone-ssh",
"environment": {
"LOCAL_DOCKER_REGISTRY": fromSecret("local-docker-registry"),
"SSH_HOST": fromSecret("ssh-host"),
"SSH_USER": fromSecret("ssh-user"),
"SSH_PORT": fromSecret("ssh-port"),
},
"settings": {
"envs": [
"local_docker_registry",
"ssh_host",
"ssh_user",
"ssh_port",
],
"host": fromSecret("ssh-host"),
"port": fromSecret("ssh-port"),
"username": fromSecret("ssh-user"),
"password": fromSecret("ssh-password"),
"script": [
"echo SSH_HOST=$SSH_HOST > env-stack",
"echo SSH_PORT=$SSH_PORT >> env-stack",
"echo LOCAL_DOCKER_REGISTRY=$LOCAL_DOCKER_REGISTRY >> env-stack",
]
}
}
def steps(name):
return {
"kind": "pipeline",
@ -18,6 +52,7 @@ def steps(name):
def main(ctx):
return [
printenv(),
steps('first'),
steps('second'),
]