blob: f61a28cfa8fbe0435c3772c5436c51d4edca55ec [file] [log] [blame]
// Copyright 2019 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto2";
package scheduler;
// Model of .ci.yaml.
// Next ID: 4
message SchedulerConfig {
// Targets to run from this config.
repeated Target targets = 1;
// Git branches to run these targets against.
repeated string enabled_branches = 2;
// Universal platform args passed to LUCI builders.
// Keys are the platforms and values are the PlatformProperties (properties, dimensions etc.).
map<string, PlatformProperties> platform_properties = 3;
// Next ID: 3
message PlatformProperties {
// Generic key, value pairs to set platform-wide properties
map<string, string> properties = 1;
// Generic key, value pairs to set platform-wide dimensions
// Doc for dimension and properties: https://chromium.googlesource.com/infra/luci/luci-py/+/HEAD/appengine/swarming/doc/User-Guide.md
map<string, string> dimensions = 2;
}
}
// A unit of work for infrastructure to run.
// Next ID: 17
message Target {
// Unique, human readable identifier.
optional string name = 1;
// Names of other targets required to succeed before triggering this target.
repeated string dependencies = 2;
// Whether this target is stable and can be used to gate commits.
// Defaults to false which blocks builds and does not run in presubmit.
optional bool bringup = 3 [default = false];
// Number of minutes this target is allowed to run before being marked as failed.
optional int32 timeout = 4 [default = 30];
// Name of the testbed this target will run on.
// Defaults to a linux vm.
optional string testbed = 5 [default = 'linux-vm'];
// Properties to configure infrastructure tooling.
map<string, string> properties = 6;
// Name of the LUCI builder to trigger.
optional string builder = 7 [deprecated = true];
// Name of the scheduler to trigger this target.
// Defaults to being triggered by cocoon.
optional SchedulerSystem scheduler = 8 [default = cocoon];
// Whether target should run pre-submit. Defaults to true, will run in presubmit.
optional bool presubmit = 9 [default = true];
// Whether target should run post-submit. Defaults to true, will run in postsubmit.
optional bool postsubmit = 10 [default = true];
// List of paths that trigger this target in presubmit when there is a diff.
// If no paths are given, it will always run.
repeated string run_if = 11;
// Override of enabled_branches for this target (for release targets).
repeated string enabled_branches = 12;
// Name of the LUCI recipe to use for the builder.
optional string recipe = 13;
reserved 14; // tags
// Properties to configure infrastructure tooling for only postsubmit runs.
map<string, string> postsubmit_properties = 15;
// Dimensions to configure swarming dimensions of LUCI builds.
map<string, string> dimensions = 16;
}
// Schedulers supported in SchedulerConfig.
// Next ID: 4
enum SchedulerSystem {
// Cocoon will handle all actions for the target (initial trigger, retries).
cocoon = 1;
// LUCI triggers the build when mirrored to GoB. Cocoon triggers retries.
luci = 2;
// Google internally uses Flutter, and validates if tip-of-tree causes breakages.
google_internal = 3;
}