From 5c4dff0fd99472d2d433d1ba61c610e265e4f918 Mon Sep 17 00:00:00 2001 From: Simone Gotti Date: Fri, 24 May 2019 16:17:00 +0200 Subject: [PATCH] webhook: export git branch and tag env vars export AGOLA_GIT_BRANCH and AGOLA_GIT_TAG env vars. They will be mutually empty if on a branch or tag. --- internal/services/gateway/webhook.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/services/gateway/webhook.go b/internal/services/gateway/webhook.go index b64af91..a9c2a28 100644 --- a/internal/services/gateway/webhook.go +++ b/internal/services/gateway/webhook.go @@ -260,6 +260,8 @@ func (h *webhooksHandler) handleWebhook(r *http.Request) (int, string, error) { "AGOLA_REPOSITORY_URL": cloneURL, "AGOLA_GIT_HOST": gitHost, "AGOLA_GIT_PORT": gitPort, + "AGOLA_GIT_BRANCH": webhookData.Branch, + "AGOLA_GIT_TAG": webhookData.Tag, "AGOLA_GIT_REF": webhookData.Ref, "AGOLA_GIT_COMMITSHA": webhookData.CommitSHA, }