.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
00eb0455c3
commit
9667315500
|
@ -49,11 +49,7 @@ steps:
|
||||||
when:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- home-deploy
|
- home-deploy
|
||||||
image: docker:dind
|
image: alpine
|
||||||
volumes:
|
|
||||||
- name: dockersock
|
|
||||||
path: /var/run
|
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
- sleep 15
|
- sleep 15
|
||||||
- name: build-postgres
|
- name: build-postgres
|
||||||
|
|
12
.drone.star
12
.drone.star
|
@ -10,16 +10,14 @@ def map(fn, l):
|
||||||
return [fn(x) for x in l]
|
return [fn(x) for x in l]
|
||||||
def echo(x):
|
def echo(x):
|
||||||
return "echo {secret}=${environment} >> env-stack".format(secret = x, environment = x.replace("-", "_").upper())
|
return "echo {secret}=${environment} >> env-stack".format(secret = x, environment = x.replace("-", "_").upper())
|
||||||
def identity(x): return x
|
|
||||||
def printSecrets(env):
|
def printSecrets(env):
|
||||||
envv = map(identity, env)
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"name": "print secrets",
|
"name": "print secrets",
|
||||||
"image": "appleboy/drone-ssh",
|
"image": "appleboy/drone-ssh",
|
||||||
"environment": environment(env),
|
"environment": environment(env),
|
||||||
"settings": {
|
"settings": {
|
||||||
"envs": [x.replace("-", "_") for x in envv ],
|
"envs": [x.replace("-", "_") for x in env ],
|
||||||
"host": fromSecret("ssh-host"),
|
"host": fromSecret("ssh-host"),
|
||||||
"port": fromSecret("ssh-port"),
|
"port": fromSecret("ssh-port"),
|
||||||
"username": fromSecret("ssh-user"),
|
"username": fromSecret("ssh-user"),
|
||||||
|
@ -29,6 +27,13 @@ def printSecrets(env):
|
||||||
] + map(echo, env)
|
] + map(echo, env)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
def wait(delay, name):
|
||||||
|
return {
|
||||||
|
name,
|
||||||
|
"image": "alpine",
|
||||||
|
"commands": "sleep {delay}".format(delay = delay),
|
||||||
|
}
|
||||||
|
|
||||||
def steps(name, dependsOn):
|
def steps(name, dependsOn):
|
||||||
return {
|
return {
|
||||||
"kind": "pipeline",
|
"kind": "pipeline",
|
||||||
|
@ -41,6 +46,7 @@ def steps(name, dependsOn):
|
||||||
"ssh-user",
|
"ssh-user",
|
||||||
"ssh-port",
|
"ssh-port",
|
||||||
]),
|
]),
|
||||||
|
wait(15, "wait"),
|
||||||
{
|
{
|
||||||
"name": "build",
|
"name": "build",
|
||||||
"image": "alpine",
|
"image": "alpine",
|
||||||
|
|
Reference in New Issue