.
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),
|
"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(
|
def deploy(
|
||||||
filename,
|
filename,
|
||||||
folder,
|
folder,
|
||||||
):
|
):
|
||||||
images = [
|
|
||||||
"letsencrypt-git",
|
|
||||||
"letsencrypt-chat",
|
|
||||||
"letsencrypt-drone",
|
|
||||||
"letsencrypt-remote",
|
|
||||||
"letsencrypt-blog",
|
|
||||||
"nginx-home1",
|
|
||||||
"drone-starlark",
|
|
||||||
]
|
|
||||||
return {
|
return {
|
||||||
"name": "deploy",
|
"name": "deploy",
|
||||||
"image": "appleboy/drone-ssh",
|
"image": "appleboy/drone-ssh",
|
||||||
|
@ -77,7 +89,6 @@ def deploy(
|
||||||
"set -e"
|
"set -e"
|
||||||
] +
|
] +
|
||||||
map(export, publicSecrets + secretSecrets) +
|
map(export, publicSecrets + secretSecrets) +
|
||||||
["docker pull $${{LOCAL_DOCKER_REGISTRY}}{image}".format(image=image) for image in images ] +
|
|
||||||
[
|
[
|
||||||
"docker network prune -f",
|
"docker network prune -f",
|
||||||
"cd {folder}".format(folder=folder),
|
"cd {folder}".format(folder=folder),
|
||||||
|
@ -148,6 +159,15 @@ def main(ctx):
|
||||||
#buildNginx("remote"),
|
#buildNginx("remote"),
|
||||||
#buildNginx("chat"),
|
#buildNginx("chat"),
|
||||||
scp("~/gitea-drone-stack"),
|
scp("~/gitea-drone-stack"),
|
||||||
|
pull([
|
||||||
|
"letsencrypt-git",
|
||||||
|
"letsencrypt-chat",
|
||||||
|
"letsencrypt-drone",
|
||||||
|
"letsencrypt-remote",
|
||||||
|
"letsencrypt-blog",
|
||||||
|
"nginx-home1",
|
||||||
|
"drone-starlark",
|
||||||
|
]),
|
||||||
deploy(
|
deploy(
|
||||||
"docker-compose-home.yml",
|
"docker-compose-home.yml",
|
||||||
"/home/giles/gitea-drone-stack",
|
"/home/giles/gitea-drone-stack",
|
||||||
|
|
Reference in New Issue