.
continuous-integration/drone/push Build was killed Details

This commit is contained in:
Giles Bradshaw 2020-04-30 01:23:15 +01:00
parent 046d01aff8
commit 76f74ca79f
2 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,21 @@
load("@this//:from-secret.star", "fromSecret")
def rescale(
service,
scaleTo
):
return {
"name": "deploy",
"image": "appleboy/drone-ssh",
"settings": {
"host": fromSecret("ssh-host"),
"port": fromSecret("ssh-port"),
"username": fromSecret("ssh-root-user"),
"password": fromSecret("ssh-root-password"),
"script": [
"set -e",
"docker service scale {service}=0".format(service=service),
"docker service scale {service}={scaleTo}".format(service=service, scaleTo=scaleTo),
]
}
}

View File

@ -11,6 +11,7 @@ load("@this//:build.star", "build")
load("@this//:scp.star", "scp") load("@this//:scp.star", "scp")
load("@this//stack:public-secrets.star", "publicSecrets") load("@this//stack:public-secrets.star", "publicSecrets")
load("@this//stack:secret-secrets.star", "secretSecrets") load("@this//stack:secret-secrets.star", "secretSecrets")
load("@this//rescale.star", "rescale")
load("@this//:pull.star", "pull") load("@this//:pull.star", "pull")
load("@this//:deploy.star", "deploy") load("@this//:deploy.star", "deploy")
load("@this//:build-folder.star", "buildFolder") load("@this//:build-folder.star", "buildFolder")
@ -35,10 +36,14 @@ def drone(
secretSecrets, secretSecrets,
), ),
wait(15, "wait"), wait(15, "wait"),
build("drone-starlark"),
rescale(
"{name}_drone-starlark".format(name=name),
1,
),
build("guacamole-postgresql"), build("guacamole-postgresql"),
build("ngrok-gitea"), build("ngrok-gitea"),
build("letsencrypt-nginx"), build("letsencrypt-nginx"),
build("drone-starlark"),
build("ghost"), build("ghost"),
buildDockerFolder( buildDockerFolder(
"Dockerfile.git", "Dockerfile.git",