.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
180415b0a5
commit
e8e4491647
40
.drone.star
40
.drone.star
|
@ -9,6 +9,8 @@ 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")
|
||||
|
||||
def buildHome():
|
||||
return {
|
||||
|
@ -52,25 +54,10 @@ def deploy(
|
|||
filename,
|
||||
folder,
|
||||
):
|
||||
secrets = [
|
||||
"drone-rpc-secret",
|
||||
"drone-gitea-client-id",
|
||||
"drone-gitea-client-secret",
|
||||
"drone-gitea-server",
|
||||
"drone-convert-secret",
|
||||
"ssh-user",
|
||||
"local-docker-registry",
|
||||
"certbot-email",
|
||||
"git-domain",
|
||||
"drone-domain",
|
||||
"chat-domain",
|
||||
"remote-domain",
|
||||
"blog-domain",
|
||||
]
|
||||
return {
|
||||
"name": "deploy",
|
||||
"image": "appleboy/drone-ssh",
|
||||
"environment": environment(secrets),
|
||||
"environment": environment(publicSecrets + secretSecrets),
|
||||
"settings": {
|
||||
"envs": [x.replace("-", "_") for x in secrets ],
|
||||
"host": fromSecret("ssh-host"),
|
||||
|
@ -79,7 +66,7 @@ def deploy(
|
|||
"password": fromSecret("ssh-root-password"),
|
||||
"script": [
|
||||
"set -e"
|
||||
] + map(export, secrets) + [
|
||||
] + map(export, publicSecrets + secretSecrets) + [
|
||||
"echo {folder}".format(folder=folder),
|
||||
"cd {folder}".format(folder=folder),
|
||||
"docker pull $${LOCAL_DOCKER_REGISTRY}letsencrypt-git",
|
||||
|
@ -105,23 +92,8 @@ def pipeline(name, steps, dependsOn):
|
|||
"steps": [
|
||||
printSecrets(
|
||||
"env-stack",
|
||||
[
|
||||
"blog-domain",
|
||||
"certbot-email",
|
||||
"chat-domain",
|
||||
"drone-domain",
|
||||
"drone-gitea-client-id",
|
||||
"drone-gitea-server",
|
||||
"git-domain",
|
||||
"local-docker-registry",
|
||||
"remote-domain",
|
||||
"ssh-user",
|
||||
],
|
||||
[
|
||||
"drone-convert-secret",
|
||||
"drone-gitea-client-secret",
|
||||
"drone-rpc-secret",
|
||||
],
|
||||
publicSecrets,
|
||||
secretSecrets,
|
||||
),
|
||||
wait(15, "wait"),
|
||||
] + steps,
|
||||
|
|
Reference in New Issue