120 lines
2.9 KiB
Plaintext
120 lines
2.9 KiB
Plaintext
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//stack:public-secrets.star", "publicSecrets")
|
|
load("@this//stack:secret-secrets.star", "secretSecrets")
|
|
load("@this//:rescale.star", "rescale")
|
|
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 drone(
|
|
ctx,
|
|
branch,
|
|
base,
|
|
name,
|
|
commands,
|
|
):
|
|
if ctx.build.branch == branch:
|
|
return [
|
|
pipeline(
|
|
branch,
|
|
[
|
|
wait(15, "wait"),
|
|
build("drone-starlark"),
|
|
printSecrets(
|
|
"env-stack",
|
|
publicSecrets,
|
|
secretSecrets,
|
|
),
|
|
build("gitea"),
|
|
build("guacamole-postgresql"),
|
|
build("ngrok-gitea"),
|
|
build("letsencrypt-nginx"),
|
|
build("ghost"),
|
|
buildDockerFolder(
|
|
"Dockerfile.git",
|
|
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
|
|
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-git",
|
|
"letsencrypt-nginx",
|
|
"git",
|
|
),
|
|
buildDockerFolder(
|
|
"Dockerfile.drone",
|
|
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
|
|
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-drone",
|
|
"letsencrypt-nginx",
|
|
"drone",
|
|
),
|
|
scp(base),
|
|
pull(
|
|
"pull images",
|
|
[
|
|
"drone-starlark",
|
|
"gitea",
|
|
"ghost",
|
|
"ngrok-gitea",
|
|
"letsencrypt-git",
|
|
"letsencrypt-drone",
|
|
"guacamole-postgresql",
|
|
],
|
|
),
|
|
#pull(
|
|
# "pull registry",
|
|
# [
|
|
# "letsencrypt-registry",
|
|
# ],
|
|
#),
|
|
#deploy(
|
|
# "docker-compose-registry.yml",
|
|
# 'registry',
|
|
# base,
|
|
# publicSecrets + secretSecrets,
|
|
# commands,
|
|
# ctx
|
|
#),
|
|
deploy(
|
|
"docker-compose.yml",
|
|
name,
|
|
base,
|
|
publicSecrets + secretSecrets,
|
|
commands,
|
|
ctx
|
|
),
|
|
],
|
|
[],
|
|
[
|
|
{
|
|
"name": "ca",
|
|
"host": {
|
|
"path": "/etc/docker/certs.d",
|
|
},
|
|
}
|
|
],
|
|
[
|
|
{
|
|
"name": "ca",
|
|
"path": "/etc/docker/certs.d",
|
|
},
|
|
]
|
|
),
|
|
]
|
|
else:
|
|
return pipeline(
|
|
ctx.build.branch,
|
|
[],
|
|
[],
|
|
[],
|
|
[],
|
|
)
|
|
|