| // 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. |
| |
| // Schemas for service configs. |
| |
| syntax = "proto3"; |
| |
| package buildbucket; |
| |
| import "go.chromium.org/luci/buildbucket/proto/project_config.proto"; |
| |
| option go_package = "go.chromium.org/luci/buildbucket/proto;buildbucketpb"; |
| |
| // Schema of settings.cfg file, a service config. |
| message SettingsCfg { |
| // Swarmbucket settings. |
| SwarmingSettings swarming = 1; |
| LogDogSettings logdog = 2; |
| ResultDBSettings resultdb = 4; |
| |
| ExperimentSettings experiment = 5; |
| |
| CipdSettings cipd = 6; |
| |
| // List of Gerrit hosts to force git authentication for. |
| // |
| // By default public hosts are accessed anonymously, and the anonymous access |
| // has very low quota. Context needs to know all such hostnames in advance to |
| // be able to force authenticated access to them. |
| repeated string known_public_gerrit_hosts = 3; |
| } |
| |
| // Swarmbucket settings. |
| message SwarmingSettings { |
| reserved 1; // default_hostname |
| // Swarmbucket build URLs will point to this Milo instance. |
| string milo_hostname = 2; |
| |
| // These caches are available to all builders implicitly. |
| // A builder may override a cache specified here. |
| repeated BuilderConfig.CacheEntry global_caches = 4; |
| |
| // CIPD package. Does not specify installation path. |
| message Package { |
| // CIPD package name, e.g. "infra/python/cpython/${platform}" |
| string package_name = 1; |
| // CIPD instance version, e.g. "version:2.7.15.chromium14". |
| // Used for non-canary builds. |
| string version = 2; |
| // CIPD instance version for canary builds. |
| // Defaults to version. |
| string version_canary = 3; |
| |
| // Include in builders matching the predicate. |
| BuilderPredicate builders = 4; |
| |
| // Subdirectory to install the package into, relative to the installation |
| // root. Useful if installing two packages at the same root would conflict. |
| string subdir = 5; |
| |
| // Omit this package from the build having any of these experiments. |
| repeated string omit_on_experiment = 6; |
| |
| // If non-empty, include this package only on builds which have any of these |
| // experiments set. `omit_on_experiment` takes precedence if an experiment |
| // is in both of these lists. |
| repeated string include_on_experiment = 7; |
| } |
| |
| // Packages available to the user executable in $PATH. |
| // Installed in "{TASK_RUN_DIR}/cipd_bin_packages". |
| // "{TASK_RUN_DIR}/cipd_bin_packages" and |
| // "{TASK_RUN_DIR}/cipd_bin_packages/bin" are prepended to $PATH. |
| repeated Package user_packages = 5; |
| |
| reserved 6; // luci_runner_package |
| |
| // Package of buildbucket agent, |
| // https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/buildbucket/cmd/bbagent |
| // used to run LUCI executables. |
| Package bbagent_package = 8; |
| |
| // CIPD package of kitchen binary. DEPRECATED. TODO(nodir): remove. |
| Package kitchen_package = 7; |
| } |
| |
| message LogDogSettings { |
| // Hostname of the LogDog instance to use, e.g. "logs.chromium.org". |
| string hostname = 1; |
| } |
| |
| // ExperimentSettings controls all well-known global experiment values. |
| message ExperimentSettings { |
| message Experiment { |
| // The name of the global experiment. |
| string name = 1; |
| |
| // The default_value (% chance, 0 - 100) of the global experiment. |
| // |
| // This must be greater than or equal to minimum_value. |
| int32 default_value = 2; |
| |
| // The minimum_value (% chance, 0 - 100) of the global experiment. |
| // |
| // This will override lower Builder-defined experiment values. |
| int32 minimum_value = 3; |
| |
| // Allows temporary exclusion of builders from the experiment. |
| // Each line here should have a corresponding bug to remove the exclusion. |
| // |
| // If a builder is excluded from this experiment, it acts as though |
| // default_value and minimum_value are both 0. |
| BuilderPredicate builders = 4; |
| |
| // If this is true it means that the experiment has no effect, and is safe |
| // to stop setting in user configs. Additionally, Buildbucket will stop |
| // setting this experiment negatively on Builds. |
| // |
| // When removing a global experiment, set this to true rather than removing |
| // the experiment entirely, because Buildbucket still needs this to permit |
| // (and ignore) user configs which still mention reserved experiments (e.g. |
| // if we have "luci.something" which someone explicitly specifies, and we |
| // ramp it to 100% and remove it from the global spec, Buildbucket will |
| // start complaining that users are using a reserved experiment name, rather |
| // than just ignoring it). |
| // |
| // If inactive experiments appear in user configurations, it may cause |
| // warnings to be printed e.g. at config validation time and/or on the LUCI |
| // UI, etc. |
| bool inactive = 5; |
| } |
| repeated Experiment experiments = 1; |
| } |
| |
| // A predicate for a builder. |
| message BuilderPredicate { |
| // OR-connected list of regular expressions for a string |
| // "{project}/{bucket}/{builder}". |
| // Each regex is wrapped in ^ and $ automatically. |
| // Examples: |
| // |
| // # All builders in "chromium" project |
| // regex: "chromium/.+" |
| // # A specific builder. |
| // regex: "infra/ci/infra-continuous-trusty-64" |
| // |
| // Defaults to [".*"]. |
| repeated string regex = 1; |
| |
| // Like regex field, but negation. Negation always wins. |
| repeated string regex_exclude = 2; |
| } |
| |
| message ResultDBSettings { |
| // Hostname of the ResultDB instance to use, e.g. "results.api.cr.dev". |
| string hostname = 1; |
| } |
| |
| message CipdSettings { |
| // default CIPD server to use for this setting configuration, |
| // e.g. "chrome-infra-packages.appspot.com". |
| string server = 1; |
| } |