.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Giles Bradshaw 2020-04-28 16:39:52 +01:00
parent bfc5c789bc
commit 013a0b4e7f
2 changed files with 88 additions and 9 deletions

View File

@ -32,14 +32,7 @@ def main(ctx):
#build("guacamole-postgresql"), #build("guacamole-postgresql"),
#build("ngrok-gitea"), #build("ngrok-gitea"),
#build("letsencrypt-nginx"), #build("letsencrypt-nginx"),
#build("drone-starlark"), build("drone-starlark"),
#buildDockerFolder(
# "Dockerfile.drone",
# "$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
# "$${LOCAL_DOCKER_REGISTRY}letsencrypt-drone",
# "letsencrypt-nginx",
# "drone",
#),
buildDockerFolder( buildDockerFolder(
"Dockerfile.git", "Dockerfile.git",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx", "$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
@ -47,7 +40,7 @@ def main(ctx):
"letsencrypt-nginx", "letsencrypt-nginx",
"git", "git",
), ),
scp("~/gitea-drone-stack"), scp("/home/giles/gitea-drone-stack"),
pull([ pull([
"letsencrypt-git", "letsencrypt-git",
"letsencrypt-drone", "letsencrypt-drone",

View File

@ -0,0 +1,86 @@
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//: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(
branch,
base,
):
if ctx.build.branch == branch:
return [
pipeline(
branch,
[
printSecrets(
"env-stack",
publicSecrets,
secretSecrets,
),
wait(15, "wait"),
build("guacamole-postgresql"),
build("ngrok-gitea"),
build("letsencrypt-nginx"),
build("drone-starlark"),
buildDockerFolder(
"Dockerfile.git",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-nginx",
"$${LOCAL_DOCKER_REGISTRY}letsencrypt-git",
"letsencrypt-nginx",
"git",
),
scp(base),
pull([
"letsencrypt-git",
"letsencrypt-drone",
"drone-starlark",
"guacamole-postgresql",
]),
deploy(
"docker-compose-home.yml",
"gitea",
base,
publicSecrets + secretSecrets
),
],
[],
[
{
"name": "ca",
"host": {
"path": "{base}/.ca".format(base = base),
},
}
],
[
{
"name": "ca",
"path": "/etc/docker/certs.d",
},
]
),
]
else:
return pipeline(
ctx.build.branch,
[],
[],
[],
[],
)