| Index: logdog/client/annotee/annotation/annotation.go
|
| diff --git a/logdog/client/annotee/annotation/annotation.go b/logdog/client/annotee/annotation/annotation.go
|
| index e6634009da5c6e5d13f7011ccf4bab6ee634a9d5..57859f915174a368dfa1d4c082161fcd0a2a54c7 100644
|
| --- a/logdog/client/annotee/annotation/annotation.go
|
| +++ b/logdog/client/annotee/annotation/annotation.go
|
| @@ -15,6 +15,7 @@
|
| package annotation
|
|
|
| import (
|
| + "encoding/hex"
|
| "fmt"
|
| "strconv"
|
| "strings"
|
| @@ -372,10 +373,38 @@ func (s *State) Append(annotation string) error {
|
| }
|
| updatedIf(step, UpdateIterative, step.SetProperty(parts[0], parts[1]))
|
|
|
| - // @@@STEP_TRIGGER@<spec>@@@
|
| + // @@@STEP_TRIGGER@<spec>@@@
|
| case "STEP_TRIGGER":
|
| // Annotee will stop short of sending an actual request to BuildBucket.
|
| break
|
| +
|
| + // This is ONLY supported by annotee, not by buildbot.
|
| + // @@@DEPLOYMENT_MANIFEST@<name>@<sha256>@<url>@@@
|
| + case "DEPLOYMENT_MANIFEST":
|
| + parts := strings.SplitN(params, "@", 3)
|
| + if len(parts) != 3 {
|
| + return fmt.Errorf("DEPLOYMENT_MANIFEST expected 3 params, got %q", params)
|
| + }
|
| +
|
| + step := s.RootStep()
|
| + if step.DeploymentManifests == nil {
|
| + step.DeploymentManifests = map[string]*milo.Step_ManifestLink{}
|
| + }
|
| +
|
| + name, hashHex, url := parts[0], parts[1], parts[2]
|
| + hash, err := hex.DecodeString(hashHex)
|
| + if err != nil {
|
| + return fmt.Errorf("DEPLOYMENT_MANIFEST has bad hash: %s", err)
|
| + }
|
| + if _, ok := step.DeploymentManifests[name]; ok {
|
| + return fmt.Errorf("repeated DEPLOYMENT_MANIFEST name %q", name)
|
| + }
|
| +
|
| + step.DeploymentManifests[name] = &milo.Step_ManifestLink{
|
| + Sha256: hash,
|
| + Url: url,
|
| + }
|
| + updated = step
|
| }
|
|
|
| if updated != nil {
|
|
|