Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(468)

Unified Diff: milo/appengine/buildbucket/properties.go

Issue 2944983003: [milo] {buildbucket,buildbot,swarming,logdog} -> backends/*. (Closed)
Patch Set: fix the tests Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: milo/appengine/buildbucket/properties.go
diff --git a/milo/appengine/buildbucket/properties.go b/milo/appengine/buildbucket/properties.go
deleted file mode 100644
index 904c2a4c7a126ac99876dd9211c933a7f1e04259..0000000000000000000000000000000000000000
--- a/milo/appengine/buildbucket/properties.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2016 The LUCI Authors. All rights reserved.
-// Use of this source code is governed under the Apache License, Version 2.0
-// that can be found in the LICENSE file.
-
-package buildbucket
-
-import (
- "bytes"
- "strconv"
-)
-
-// This file is about buildbucket build params in the format supported by
-// Buildbot.
-
-// properties is well-established build properties.
-type properties struct {
- PatchStorage string `json:"patch_storage"` // e.g. "rietveld", "gerrit"
-
- RietveldURL string `json:"rietveld"` // e.g. "https://codereview.chromium.org"
- Issue number `json:"issue"` // e.g. 2127373005
- PatchSet number `json:"patchset"` // e.g. 40001 for rietveld
-
- GerritPatchURL string `json:"patch_gerrit_url"` // e.g. "https://chromium-review.googlesource.com"
- GerritPatchIssue int `json:"patch_issue"` // e.g. 358171
- GerritPatchSet number `json:"patch_set"` // e.g. 1
- GerritPatchProject string `json:"patch_project"` // e.g. "infra/infra"
- GerritPatchRepositoryURL string `json:"patch_repository_url"` // e.g. https://chromium.googlesource.com/infra/infra
-
- Revision string `json:"revision"` // e.g. "0b04861933367c62630751702c84fd64bc3caf6f"
- BlameList []string `json:"blamelist"` // e.g. ["someone@chromium.org"]
-
- // Fields below are present only in ResultDetails.
-
- GotRevision string `json:"got_revision"` // e.g. "0b04861933367c62630751702c84fd64bc3caf6f"
- BuildNumber int `json:"buildnumber"` // e.g. 3021
-}
-
-// number is an integer that supports JSON unmarshalling from a string.
-type number int
-
-// UnmarshalJSON parses data as an integer, whether data is a number or string.
-func (n *number) UnmarshalJSON(data []byte) error {
- data = bytes.Trim(data, `"`)
- num, err := strconv.Atoi(string(data))
- if err == nil {
- *n = number(num)
- }
- return err
-}
-
-// change is used in "changes" buildbucket parameters; supported by buildbot
-// See https://chromium.googlesource.com/chromium/tools/build/+/master/scripts/master/buildbucket/README.md#Build-parameters
-type change struct {
- Author struct{ Email string }
-}
-
-// buildParameters is contents of "parameters_json" buildbucket build field
-// in the format supported by Buildbot, see
-// // See https://chromium.googlesource.com/chromium/tools/build/+/master/scripts/master/buildbucket/README.md#Build-parameters
-//
-// Buildbucket is not aware of this format, but majority of chrome-infra is.
-type buildParameters struct {
- BuilderName string `json:"builder_name"`
- Properties properties
- Changes []change
-}
-
-// resultDetails is contents of "result_details_json" buildbucket build field
-// in the format supported by Buildbot.
-type resultDetails struct {
- Properties properties
-}
« no previous file with comments | « milo/appengine/buildbucket/html.go ('k') | milo/appengine/buildbucket/testdata/master.tryserver.infra/InfraPresubmit.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698