diff options
-rw-r--r-- | ops/besadii/main.go2 | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/ops/besadii/main.go2 b/ops/besadii/main.go2 index bbbecda85d8a..3acc8d8da8ff 100644 --- a/ops/besadii/main.go2 +++ b/ops/besadii/main.go2 @@ -47,17 +47,21 @@ type Author struct { // Build is the representation of a Buildkite build as described on // https://buildkite.com/docs/apis/rest-api/builds#create-a-build type Build struct { - Commit string `json:"commit"` - Branch string `json:"branch"` - Message string `json:"message"` - Author Author `json:"author"` + Commit string `json:"commit"` + Branch string `json:"branch"` + Message string `json:"message"` + Author Author `json:"author"` + Env map[string]string `json:"env"` } // Trigger a build of a given branch & commit on Buildkite func triggerBuild(log *syslog.Writer, token string, update *refUpdated) error { var message string + env := make(map[string]string) if update.changeId != nil && update.patchset != nil { + env["GERRIT_CHANGE_ID"] = *update.changeId + env["GERRIT_PATCHSET"] = *update.patchset message = fmt.Sprintf(":llama: depot @ https://cl.tvl.fyi/c/depot/+/%s/%s", *update.changeId, *update.patchset) } else { message = fmt.Sprintf(":llama: depot @ %s", update.commit) @@ -67,6 +71,7 @@ func triggerBuild(log *syslog.Writer, token string, update *refUpdated) error { Commit: update.commit, Branch: update.ref, Message: message, + Env: env, Author: Author{ Name: update.submitter, Email: update.email, |