| // Copyright 2018 The LUCI Authors. |
| // |
| // Licensed under the Apache License, Version 2.0 (the "License"); |
| // you may not use this file except in compliance with the License. |
| // You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| |
| syntax = "proto3"; |
| |
| package buildbucket.v2; |
| |
| option go_package = "go.chromium.org/luci/buildbucket/proto;buildbucketpb"; |
| |
| import "google/protobuf/timestamp.proto"; |
| |
| // Status of a build or a step. |
| enum Status { |
| // Unspecified state. Meaning depends on the context. |
| STATUS_UNSPECIFIED = 0; |
| // Build was scheduled, but did not start or end yet. |
| SCHEDULED = 1; |
| // Build/step has started. |
| STARTED = 2; |
| // A union of all terminal statuses. |
| // Can be used in BuildPredicate.status. |
| // A concrete build cannot have this status. |
| // Can be used as a bitmask to check that a build ended. |
| ENDED_MASK = 4; |
| // A build/step ended successfully. |
| SUCCESS = 12; // 8 | ENDED |
| // A build/step ended unsuccessfully due to its Build.Input, |
| // e.g. tests failed, and NOT due to a build infrastructure failure. |
| FAILURE = 20; // 16 | ENDED |
| // A build/step ended unsuccessfully due to a failure independent of the input, |
| // e.g. swarming failed, or the recipe was unable to read the patch from gerrit.. |
| INFRA_FAILURE = 36; // 32 | ENDED |
| // A build was cancelled explicitly, e.g. via an RPC. |
| CANCELED = 68; // 64 | ENDED |
| } |
| |
| // A Gerrit patchset. |
| message GerritChange { |
| // Gerrit hostname, e.g. "chromium-review.googlesource.com". |
| string host = 1; |
| // Gerrit project, e.g. "chromium/src". |
| string project = 2; |
| // Change number, e.g. 12345. |
| int64 change = 3; |
| // Patch set number, e.g. 1. |
| int64 patchset = 4; |
| } |
| |
| // A landed Git commit hosted on Gitiles. |
| message GitilesCommit { |
| // Gitiles hostname, e.g. "chromium.googlesource.com". |
| string host = 1; |
| // Repository name on the host, e.g. "chromium/src". |
| string project = 2; |
| // Commit HEX SHA1. |
| string id = 3; |
| // Commit ref, e.g. "refs/heads/master". |
| // NOT a branch name: if specified, must start with "refs/". |
| string ref = 4; |
| } |
| |
| // A key-value pair of strings. |
| message StringPair { |
| string key = 1; |
| string value = 2; |
| } |
| |
| // Half-open time range. |
| message TimeRange { |
| // Inclusive lower boundary. Optional. |
| google.protobuf.Timestamp start_time = 1; |
| // Exclusive upper boundary. Optional. |
| google.protobuf.Timestamp end_time = 2; |
| } |
| |
| // A boolean with an undefined value. |
| enum Trinary { |
| UNSET = 0; |
| YES = 1; |
| NO = 2; |
| } |