This repository has been archived on 2020-08-11. You can view files and clone it, but cannot push or open issues or pull requests.
stack/.drone-do.star

82 lines
2.1 KiB
Plaintext
Raw Normal View History

2020-04-27 19:55:45 +00:00
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")
2020-04-28 09:21:45 +00:00
load("@this//stack:public-secrets.star", "publicSecrets")
2020-04-28 09:11:44 +00:00
load("@this//stack:secret-secrets.star", "secretSecrets")
2020-04-27 19:55:45 +00:00
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",
),
2020-04-28 15:24:16 +00:00
scp("/root/stack-deploy"),
2020-04-27 19:55:45 +00:00
pull([
"letsencrypt-do",
"drone-starlark",
"guacamole-postgresql",
]),
deploy(
"docker-compose-do.yml",
2020-04-27 22:53:35 +00:00
"gitea",
2020-04-28 15:24:16 +00:00
"/root/stack-deploy",
2020-04-28 08:48:30 +00:00
publicSecrets + secretSecrets,
2020-04-27 19:55:45 +00:00
),
],
[],
2020-04-28 15:29:17 +00:00
[
{
"name": "ca",
"host": {
"path": "/root/stack-deploy/.ca",
},
}
],
[
{
"name": "ca",
"path": "/etc/docker/certs.d",
},
]
2020-04-27 19:55:45 +00:00
),
]
2020-04-27 23:46:28 +00:00
else:
2020-04-27 23:51:58 +00:00
return pipeline(
ctx.build.branch,
[],
[],
[],
[],
)