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

This commit is contained in:
Giles Bradshaw 2020-04-27 20:55:45 +01:00
parent 0318e3d282
commit 079b1611ee
2 changed files with 62 additions and 76 deletions

61
.drone-do.star Normal file
View File

@ -0,0 +1,61 @@
load("@this//:from-secret.star", "fromSecret")
load("@this//:print-secrets.star", "printSecrets")
load("@this//:map.star", "map")
load("@this//:environment.star", "environment")
load("@this//:echo.star", "echo")
load("@this//:export.star", "export")
load("@this//:echo-secret.star", "echoSecret")
load("@this//:wait.star", "wait")
load("@this//:build.star", "build")
load("@this//:scp.star", "scp")
load("@this//:public-secrets.star", "publicSecrets")
load("@this//:secret-secrets.star", "secretSecrets")
load("@this//:pull.star", "pull")
load("@this//:deploy.star", "deploy")
load("@this//:build-folder.star", "buildFolder")
load("@this//:build-docker-folder.star", "buildDockerFolder")
load("@this//:pipeline.star", "pipeline")
load("@this//:clear.star", "clear")
def main(ctx):
if ctx.build.branch == 'do':
return [
pipeline(
'do',
[
printSecrets(
"env-stack",
publicSecrets,
secretSecrets,
),
clear("/home/giles/stack-deploy"),
wait(15, "wait"),
build("guacamole-postgresql"),
build("letsencrypt-nginx"),
build("drone-starlark"),
buildDockerFolder(
"Dockerfile.do",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-do",
"letsencrypt-nginx",
"do",
),
scp("/home/giles/stack-deploy"),
pull([
"letsencrypt-do",
"drone-starlark",
"guacamole-postgresql",
]),
deploy(
"docker-compose-do.yml",
"/home/giles/gitea-drone-stack",
),
],
[],
[],
[],
),
]

View File

@ -85,6 +85,7 @@ def main(ctx):
"letsencrypt-blog", "letsencrypt-blog",
"home", "home",
"drone-starlark", "drone-starlark",
"guacamole-postgresql",
]), ]),
deploy( deploy(
"docker-compose-home.yml", "docker-compose-home.yml",
@ -108,80 +109,4 @@ def main(ctx):
] ]
), ),
] ]
if ctx.build.branch == 'do':
return [
pipeline(
'do',
[
printSecrets(
"env-stack",
publicSecrets,
secretSecrets,
),
wait(15, "wait"),
build("guacamole-postgresql"),
build("ngrok-gitea"),
build("letsencrypt-nginx"),
build("drone-starlark"),
buildDockerFolder(
"Dockerfile.home",
"nginx:latest",
"$${LOCAL_DOCKER_REGISTRY}home",
"letsencrypt-nginx",
"home",
),
buildDockerFolder(
"Dockerfile.blog",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-blog",
"letsencrypt-nginx",
"blog",
),
buildDockerFolder(
"Dockerfile.drone",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-drone",
"letsencrypt-nginx",
"drone",
),
buildDockerFolder(
"Dockerfile.git",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-git",
"letsencrypt-nginx",
"git",
),
buildDockerFolder(
"Dockerfile.remote",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-remote",
"letsencrypt-nginx",
"remote",
),
buildDockerFolder(
"Dockerfile.chat",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-chat",
"letsencrypt-nginx",
"chat",
),
scp("~/gitea-drone-stack"),
pull([
"letsencrypt-git",
"letsencrypt-chat",
"letsencrypt-drone",
"letsencrypt-remote",
"letsencrypt-blog",
"home",
"drone-starlark",
]),
deploy(
"docker-compose-home.yml",
"/home/giles/gitea-drone-stack",
),
],
[],
),
]