run: export also pull request id environment variable to runs

This commit is contained in:
Simone Gotti 2020-03-05 16:03:26 +01:00
parent ac1b0dcb73
commit 627f40987e
1 changed files with 10 additions and 9 deletions

View File

@ -410,15 +410,16 @@ func (h *ActionHandler) CreateRuns(ctx context.Context, req *CreateRunRequest) e
// this env vars overrides other env vars // this env vars overrides other env vars
env := map[string]string{ env := map[string]string{
"CI": "true", "CI": "true",
"AGOLA_SSHPRIVKEY": req.SSHPrivKey, "AGOLA_SSHPRIVKEY": req.SSHPrivKey,
"AGOLA_REPOSITORY_URL": req.CloneURL, "AGOLA_REPOSITORY_URL": req.CloneURL,
"AGOLA_GIT_HOST": gitHost, "AGOLA_GIT_HOST": gitHost,
"AGOLA_GIT_PORT": gitPort, "AGOLA_GIT_PORT": gitPort,
"AGOLA_GIT_BRANCH": req.Branch, "AGOLA_GIT_BRANCH": req.Branch,
"AGOLA_GIT_TAG": req.Tag, "AGOLA_GIT_TAG": req.Tag,
"AGOLA_GIT_REF": req.Ref, "AGOLA_PULL_REQUEST_ID": req.PullRequestID,
"AGOLA_GIT_COMMITSHA": req.CommitSHA, "AGOLA_GIT_REF": req.Ref,
"AGOLA_GIT_COMMITSHA": req.CommitSHA,
} }
if req.SSHHostKey != "" { if req.SSHHostKey != "" {