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

This commit is contained in:
Giles Bradshaw 2020-04-25 19:57:07 +01:00
parent 00eb0455c3
commit 9667315500
2 changed files with 10 additions and 8 deletions

View File

@ -49,11 +49,7 @@ steps:
when:
branch:
- home-deploy
image: docker:dind
volumes:
- name: dockersock
path: /var/run
image: alpine
commands:
- sleep 15
- name: build-postgres

View File

@ -10,16 +10,14 @@ def map(fn, l):
return [fn(x) for x in l]
def echo(x):
return "echo {secret}=${environment} >> env-stack".format(secret = x, environment = x.replace("-", "_").upper())
def identity(x): return x
def printSecrets(env):
envv = map(identity, env)
return {
"name": "print secrets",
"image": "appleboy/drone-ssh",
"environment": environment(env),
"settings": {
"envs": [x.replace("-", "_") for x in envv ],
"envs": [x.replace("-", "_") for x in env ],
"host": fromSecret("ssh-host"),
"port": fromSecret("ssh-port"),
"username": fromSecret("ssh-user"),
@ -29,6 +27,13 @@ def printSecrets(env):
] + map(echo, env)
}
}
def wait(delay, name):
return {
name,
"image": "alpine",
"commands": "sleep {delay}".format(delay = delay),
}
def steps(name, dependsOn):
return {
"kind": "pipeline",
@ -41,6 +46,7 @@ def steps(name, dependsOn):
"ssh-user",
"ssh-port",
]),
wait(15, "wait"),
{
"name": "build",
"image": "alpine",