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.star

97 lines
2.9 KiB
Plaintext
Raw Normal View History

2020-04-26 13:11:56 +00:00
load("@this//:from-secret.star", "fromSecret")
load("@this//:print-secrets.star", "printSecrets")
2020-04-26 13:44:08 +00:00
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")
2020-04-26 13:58:26 +00:00
load("@this//:wait.star", "wait")
load("@this//:build.star", "build")
load("@this//:scp.star", "scp")
2020-04-26 16:11:26 +00:00
load("@this//:public-secrets.star", "publicSecrets")
load("@this//:secret-secrets.star", "secretSecrets")
2020-04-26 17:10:20 +00:00
load("@this//:pull.star", "pull")
load("@this//:deploy.star", "deploy")
2020-04-27 14:52:16 +00:00
load("@this//:build-folder.star", "buildFolder")
2020-04-27 15:19:23 +00:00
load("@this//:build-docker-folder.star", "buildDockerFolder")
2020-04-27 16:58:21 +00:00
load("@this//:pipeline.star", "pipeline")
2020-04-26 12:24:13 +00:00
2020-04-24 06:32:20 +00:00
def main(ctx):
2020-04-26 08:22:49 +00:00
if ctx.build.branch == 'home-deploy':
2020-04-26 08:19:22 +00:00
return [
2020-04-26 10:39:42 +00:00
pipeline(
2020-04-26 10:52:28 +00:00
'home-deploy',
[
2020-04-27 16:58:21 +00:00
printSecrets(
"env-stack",
publicSecrets,
secretSecrets,
),
wait(15, "wait"),
2020-04-27 17:58:48 +00:00
build("guacamole-postgresql"),
build("ngrok-gitea"),
build("letsencrypt-nginx"),
2020-04-26 17:06:31 +00:00
build("drone-starlark"),
2020-04-27 16:11:32 +00:00
buildDockerFolder(
"Dockerfile.home",
"nginx:latest",
2020-04-27 16:21:33 +00:00
"$${LOCAL_DOCKER_REGISTRY}home",
2020-04-27 16:12:32 +00:00
"letsencrypt-nginx",
"home",
2020-04-27 16:11:32 +00:00
),
2020-04-27 15:25:17 +00:00
2020-04-27 15:19:23 +00:00
buildDockerFolder(
"Dockerfile.blog",
2020-04-27 16:01:48 +00:00
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-blog",
2020-04-27 16:10:06 +00:00
"letsencrypt-nginx",
"blog",
2020-04-27 15:19:23 +00:00
),
2020-04-27 15:25:17 +00:00
buildDockerFolder(
"Dockerfile.drone",
2020-04-27 16:01:48 +00:00
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-drone",
2020-04-27 16:10:06 +00:00
"letsencrypt-nginx",
"drone",
2020-04-27 15:25:17 +00:00
),
buildDockerFolder(
"Dockerfile.git",
2020-04-27 16:01:48 +00:00
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-git",
2020-04-27 16:10:06 +00:00
"letsencrypt-nginx",
"git",
2020-04-27 15:25:17 +00:00
),
buildDockerFolder(
"Dockerfile.remote",
2020-04-27 16:01:48 +00:00
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-remote",
2020-04-27 16:10:06 +00:00
"letsencrypt-nginx",
"remote",
2020-04-27 15:25:17 +00:00
),
buildDockerFolder(
"Dockerfile.chat",
2020-04-27 16:01:48 +00:00
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-chat",
2020-04-27 16:10:06 +00:00
"letsencrypt-nginx",
"chat",
2020-04-27 15:25:17 +00:00
),
2020-04-26 12:59:31 +00:00
scp("~/gitea-drone-stack"),
2020-04-26 16:44:57 +00:00
pull([
"letsencrypt-git",
"letsencrypt-chat",
"letsencrypt-drone",
"letsencrypt-remote",
"letsencrypt-blog",
2020-04-27 16:11:32 +00:00
"home",
2020-04-26 16:44:57 +00:00
"drone-starlark",
]),
2020-04-26 10:52:28 +00:00
deploy(
"docker-compose-home.yml",
2020-04-26 13:00:59 +00:00
"/home/giles/gitea-drone-stack",
2020-04-26 10:52:28 +00:00
),
],
[],
),
]
2020-04-24 09:56:09 +00:00