This commit is contained in:
giles 2022-06-08 18:44:28 +01:00
parent f150903ca2
commit 088aba5587
1 changed files with 20 additions and 57 deletions

View File

@ -213,6 +213,9 @@
},
"GITEA_SERVER_LFS_JWT_SECRET": {
"from_secret": "gitea-server-lfs-jwt-secret"
},
"MYSQL_ROOT_PASSWORD": {
"from_secret": "mysql-root-password"
}
},
"image": "appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea",
@ -232,7 +235,8 @@
"gitea_security_secret_key",
"gitea_security_internal_token",
"gitea_oauth2_jwt_secret",
"gitea_mailer_passwd"
"gitea_mailer_passwd",
"mysql_root_password"
],
"script": [
"rm -f env-gitea",
@ -244,7 +248,8 @@
"echo \"export GITEA_SECURITY_SECRET_KEY='$${GITEA_SECURITY_SECRET_KEY}'\" >> env-gitea # \"gitea-security-secret-key\"",
"echo \"export GITEA_SECURITY_INTERNAL_TOKEN='$${GITEA_SECURITY_INTERNAL_TOKEN}'\" >> env-gitea # \"gitea-security-internal-token\"",
"echo \"export GITEA_OAUTH2_JWT_SECRET='$${GITEA_OAUTH2_JWT_SECRET}'\" >> env-gitea # \"gitea-oauth2-jwt-secret\"",
"echo \"export GITEA_MAILER_PASSWD='$${GITEA_MAILER_PASSWD}'\" >> env-gitea # \"gitea-mailer-passwd\""
"echo \"export GITEA_MAILER_PASSWD='$${GITEA_MAILER_PASSWD}'\" >> env-gitea # \"gitea-mailer-passwd\"",
"echo \"export MYSQL_ROOT_PASSWORD='$${MYSQL_ROOT_PASSWORD}'\" >> env-gitea # \"mysql-root-password\""
]
}
}
@ -259,58 +264,6 @@
},
"type": "docker"
}
---
{
"clone": {
"depth": 0,
"disable": false
},
"kind": "pipeline",
"name": "print users",
"steps": [
{
"environment": {
"DRONE_SERVER": "http://git.target-domain:5000",
"DRONE_TOKEN": "arcOzUjtbrqBFyHil29NVESbKM56aHnp"
},
"image": "drone/cli",
"name": "print env",
"settings": {
"envs": [
"drone_tag",
"drone_commit",
"drone_build_number",
"drone_repo_name",
"drone_repo_namespace",
"gitea_mailer_host",
"gitea_mailer_from",
"gitea_mailer_user",
"gitea_app_name",
"gitea_server_lfs_jwt_secret",
"gitea_security_secret_key",
"gitea_security_internal_token",
"gitea_oauth2_jwt_secret",
"gitea_mailer_passwd"
],
"script": [
"drone user ls",
]
}
}
],
"trigger": {
"event": [
"promote"
],
"target": [
"print users"
]
},
"type": "docker"
}
---
{
"clone": {
@ -348,6 +301,9 @@
},
"GITEA_SERVER_LFS_JWT_SECRET": {
"from_secret": "gitea-server-lfs-jwt-secret"
},
"MYSQL_ROOT_PASSWORD": {
"from_secret": "mysql-root-password"
}
},
"image": "appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea",
@ -367,7 +323,8 @@
"gitea_security_secret_key",
"gitea_security_internal_token",
"gitea_oauth2_jwt_secret",
"gitea_mailer_passwd"
"gitea_mailer_passwd",
"mysql_root_password"
],
"script": [
"rm -f env-gitea-secret",
@ -379,7 +336,8 @@
"echo \"docker secret add --name=GITEA_SECURITY_SECRET_KEY --data='$${GITEA_SECURITY_SECRET_KEY}' $${DRONE_REPO_NAMESPACE}/$${DRONE_REPO_NAME}\" >> env-gitea-secret # \"gitea-security-secret-key\"",
"echo \"docker secret add --name=GITEA_SECURITY_INTERNAL_TOKEN --data='$${GITEA_SECURITY_INTERNAL_TOKEN}' $${DRONE_REPO_NAMESPACE}/$${DRONE_REPO_NAME}\" >> env-gitea-secret # \"gitea-security-internal-token\"",
"echo \"docker secret add --name=GITEA_OAUTH2_JWT_SECRET --data='$${GITEA_OAUTH2_JWT_SECRET}' $${DRONE_REPO_NAMESPACE}/$${DRONE_REPO_NAME}\" >> env-gitea-secret # \"gitea-oauth2-jwt-secret\"",
"echo \"docker secret add --name=GITEA_MAILER_PASSWD --data='$${GITEA_MAILER_PASSWD}' $${DRONE_REPO_NAMESPACE}/$${DRONE_REPO_NAME}\" >> env-gitea-secret # \"gitea-mailer-passwd\""
"echo \"docker secret add --name=GITEA_MAILER_PASSWD --data='$${GITEA_MAILER_PASSWD}' $${DRONE_REPO_NAMESPACE}/$${DRONE_REPO_NAME}\" >> env-gitea-secret # \"gitea-mailer-passwd\"",
"echo \"docker secret add --name=MYSQL_ROOT_PASSWORD --data='$${MYSQL_ROOT_PASSWORD}' $${DRONE_REPO_NAMESPACE}/$${DRONE_REPO_NAME}\" >> env-gitea-secret # \"mysql-root-password\""
]
}
}
@ -520,6 +478,9 @@
},
"GITEA_SERVER_LFS_JWT_SECRET": {
"from_secret": "gitea-server-lfs-jwt-secret"
},
"MYSQL_ROOT_PASSWORD": {
"from_secret": "mysql-root-password"
}
},
"image": "appleboy/drone-ssh:1.6.2@sha256:b801dc2cd238c192b6e99acfa7bc3f5b9a03f312bd2feb1e10b3a7a28a1b80ea",
@ -544,7 +505,8 @@
"gitea_security_secret_key",
"gitea_security_internal_token",
"gitea_oauth2_jwt_secret",
"gitea_mailer_passwd"
"gitea_mailer_passwd",
"mysql_root_password"
],
"script": [
"export GITEA_SERVER_LFS_JWT_SECRET=$${GITEA_SERVER_LFS_JWT_SECRET}",
@ -552,6 +514,7 @@
"export GITEA_SECURITY_INTERNAL_TOKEN=$${GITEA_SECURITY_INTERNAL_TOKEN}",
"export GITEA_OAUTH2_JWT_SECRET=$${GITEA_OAUTH2_JWT_SECRET}",
"export GITEA_MAILER_PASSWD=$${GITEA_MAILER_PASSWD}",
"export MYSQL_ROOT_PASSWORD=$${MYSQL_ROOT_PASSWORD}",
"export GITEA_MAILER_HOST=$${GITEA_MAILER_HOST}",
"export GITEA_MAILER_FROM=$${GITEA_MAILER_FROM}",
"export GITEA_MAILER_USER=$${GITEA_MAILER_USER}",