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

79 lines
2.2 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//: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",
},
]
),
]