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.
This commit is contained in:
Simone Gotti 2019-05-24 16:17:00 +02:00
parent 42f578a0b5
commit 5c4dff0fd9
1 changed files with 2 additions and 0 deletions

View File

@ -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,
}