.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
474fefeab4
commit
a085434a14
40
.drone.star
40
.drone.star
|
@ -49,20 +49,32 @@ def buildNginx(name):
|
|||
"sh build.sh {name} $${{LOCAL_DOCKER_REGISTRY}}".format(name = name),
|
||||
],
|
||||
}
|
||||
def pull(
|
||||
images,
|
||||
):
|
||||
secrets = [ " local-docker-registry"]
|
||||
return {
|
||||
"name": "pull",
|
||||
"image": "appleboy/drone-ssh",
|
||||
"environment": environment(secrets),
|
||||
"settings": {
|
||||
"envs": [x.replace("-", "_") for x in secrets ],
|
||||
"host": fromSecret("ssh-host"),
|
||||
"port": fromSecret("ssh-port"),
|
||||
"username": fromSecret("ssh-root-user"),
|
||||
"password": fromSecret("ssh-root-password"),
|
||||
"script": [
|
||||
"set -e"
|
||||
] +
|
||||
map(export, secrets) +
|
||||
["docker pull $${{LOCAL_DOCKER_REGISTRY}}{image}".format(image=image) for image in images ]
|
||||
}
|
||||
}
|
||||
|
||||
def deploy(
|
||||
filename,
|
||||
folder,
|
||||
):
|
||||
images = [
|
||||
"letsencrypt-git",
|
||||
"letsencrypt-chat",
|
||||
"letsencrypt-drone",
|
||||
"letsencrypt-remote",
|
||||
"letsencrypt-blog",
|
||||
"nginx-home1",
|
||||
"drone-starlark",
|
||||
]
|
||||
return {
|
||||
"name": "deploy",
|
||||
"image": "appleboy/drone-ssh",
|
||||
|
@ -77,7 +89,6 @@ def deploy(
|
|||
"set -e"
|
||||
] +
|
||||
map(export, publicSecrets + secretSecrets) +
|
||||
["docker pull $${{LOCAL_DOCKER_REGISTRY}}{image}".format(image=image) for image in images ] +
|
||||
[
|
||||
"docker network prune -f",
|
||||
"cd {folder}".format(folder=folder),
|
||||
|
@ -148,6 +159,15 @@ def main(ctx):
|
|||
#buildNginx("remote"),
|
||||
#buildNginx("chat"),
|
||||
scp("~/gitea-drone-stack"),
|
||||
pull([
|
||||
"letsencrypt-git",
|
||||
"letsencrypt-chat",
|
||||
"letsencrypt-drone",
|
||||
"letsencrypt-remote",
|
||||
"letsencrypt-blog",
|
||||
"nginx-home1",
|
||||
"drone-starlark",
|
||||
]),
|
||||
deploy(
|
||||
"docker-compose-home.yml",
|
||||
"/home/giles/gitea-drone-stack",
|
||||
|
|
Reference in New Issue