.
continuous-integration/drone/push Build was killed
Details
continuous-integration/drone/push Build was killed
Details
This commit is contained in:
parent
f3f3e357a0
commit
9127904430
|
@ -0,0 +1,79 @@
|
||||||
|
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")
|
||||||
|
|
||||||
|
def main(ctx):
|
||||||
|
if ctx.build.branch == 'remote':
|
||||||
|
return [
|
||||||
|
pipeline(
|
||||||
|
'home-deploy',
|
||||||
|
[
|
||||||
|
printSecrets(
|
||||||
|
"env-stack",
|
||||||
|
publicSecrets,
|
||||||
|
secretSecrets,
|
||||||
|
),
|
||||||
|
wait(15, "wait"),
|
||||||
|
build("guacamole-postgresql"),
|
||||||
|
build("ngrok-gitea"),
|
||||||
|
build("letsencrypt-nginx"),
|
||||||
|
build("drone-starlark"),
|
||||||
|
buildDockerFolder(
|
||||||
|
"Dockerfile.drone",
|
||||||
|
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
|
||||||
|
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-drone",
|
||||||
|
"letsencrypt-nginx",
|
||||||
|
"drone",
|
||||||
|
),
|
||||||
|
buildDockerFolder(
|
||||||
|
"Dockerfile.remote",
|
||||||
|
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
|
||||||
|
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-remote",
|
||||||
|
"letsencrypt-nginx",
|
||||||
|
"remote",
|
||||||
|
),
|
||||||
|
scp("~/gitea-drone-stack"),
|
||||||
|
pull([
|
||||||
|
"letsencrypt-drone",
|
||||||
|
"letsencrypt-remote",
|
||||||
|
"drone-starlark",
|
||||||
|
"guacamole-postgresql",
|
||||||
|
]),
|
||||||
|
deploy(
|
||||||
|
"docker-compose-remote.yml",
|
||||||
|
"/home/giles/gitea-drone-stack",
|
||||||
|
),
|
||||||
|
],
|
||||||
|
[],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "ca",
|
||||||
|
"host": {
|
||||||
|
"path": "/home/giles/gitea-drone-stack/.ca",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "ca",
|
||||||
|
"path": "/etc/docker/certs.d",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
|
@ -9,7 +9,46 @@ def deploy(
|
||||||
filename,
|
filename,
|
||||||
folder,
|
folder,
|
||||||
):
|
):
|
||||||
return {
|
return {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",
|
||||||
|
),
|
||||||
|
],
|
||||||
|
[],
|
||||||
|
[],
|
||||||
|
[],
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
||||||
"name": "deploy",
|
"name": "deploy",
|
||||||
"image": "appleboy/drone-ssh",
|
"image": "appleboy/drone-ssh",
|
||||||
"environment": environment(publicSecrets + secretSecrets),
|
"environment": environment(publicSecrets + secretSecrets),
|
||||||
|
|
Reference in New Issue