From 05e1a4c038f2ff3b2659ae7f5df836c502bab574 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 7 Sep 2019 08:33:34 +0800 Subject: [PATCH] fix(server): variable is not defined --- templates/drone-server.env.j2 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/templates/drone-server.env.j2 b/templates/drone-server.env.j2 index 37d6bd1..caa8d26 100644 --- a/templates/drone-server.env.j2 +++ b/templates/drone-server.env.j2 @@ -68,7 +68,7 @@ DRONE_BITBUCKET_CLIENT_SECRET={{ drone_bitbucket_client_secret }} DRONE_BITBUCKET_SKIP_VERIFY={{ drone_bitbucket_skip_verify }} DRONE_BITBUCKET_DEBUG={{ drone_bitbucket_debug }} {% endif %} -{% if drone_stash_server != "" %} +{% if drone_stash_server is defined and drone_stash_server != "" %} DRONE_STASH_SERVER={{ drone_stash_server }} DRONE_STASH_CONSUMER_KEY={{ drone_stash_consumer_key }} DRONE_STASH_CONSUMER_SECRET={{ drone_stash_consumer_secret }} @@ -76,7 +76,7 @@ DRONE_STASH_PRIVATE_KEY={{ drone_stash_private_key }} DRONE_STASH_SKIP_VERIFY={{ drone_stash_skip_verify }} DRONE_STASH_DEBUG={{ drone_stash_debug }} {% endif %} -{% if drone_gogs_server != "" %} +{% if drone_stash_server is defined and drone_gogs_server != "" %} DRONE_GOGS_SERVER={{ drone_gogs_server }} DRONE_GOGS_SKIP_VERIFY={{ drone_gogs_skip_verify }} DRONE_GOGS_DEBUG={{ drone_gogs_debug }} @@ -119,7 +119,15 @@ DRONE_AUTHENTICATION_TOKEN={{ drone_authentication_token }} {% if drone_authentication_skip_verify is defined %} DRONE_AUTHENTICATION_SKIP_VERIFY=true {% endif %} +{% if drone_repository_filter is defined %} DRONE_REPOSITORY_FILTER={{ drone_repository_filter }} +{% endif %} +{% if drone_webhook_endpoint is defined %} DRONE_WEBHOOK_ENDPOINT={{ drone_webhook_endpoint }} +{% endif %} +{% if drone_webhook_secret is defined %} DRONE_WEBHOOK_SECRET={{ drone_webhook_secret }} +{% endif %} +{% if drone_webhook_skip_verify is defined %} DRONE_WEBHOOK_SKIP_VERIFY={{ drone_webhook_skip_verify }} +{% endif %}