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

Side by Side Diff: appengine/cr-buildbucket/proto/project_config.proto

Issue 2209583003: swarmbucket: refactor builder defaults (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: deepcopy and subctx Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | appengine/cr-buildbucket/proto/project_config_pb2.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Swarming Authors. All rights reserved. 1 // Copyright 2015 The Swarming Authors. All rights reserved.
2 // Use of this source code is governed by the Apache v2.0 license that can be 2 // Use of this source code is governed by the Apache v2.0 license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Schemas for project configs. 5 // Schemas for project configs.
6 6
7 syntax = "proto2"; 7 syntax = "proto2";
8 8
9 package buildbucket; 9 package buildbucket;
10 10
(...skipping 23 matching lines...) Expand all
34 // Repository URL of the recipe package. 34 // Repository URL of the recipe package.
35 optional string repository = 1; 35 optional string repository = 1;
36 // Name of the recipe to run. 36 // Name of the recipe to run.
37 optional string name = 2; 37 optional string name = 2;
38 // colon-separated build properties to set. 38 // colon-separated build properties to set.
39 // A property can be overriden by "properties" build parameter. 39 // A property can be overriden by "properties" build parameter.
40 // 40 //
41 // Use this field for string properties and use properties_j for other 41 // Use this field for string properties and use properties_j for other
42 // types. 42 // types.
43 repeated string properties = 3; 43 repeated string properties = 3;
44 // Same as properties, but the value must valid JSON. For example 44 // Same as properties, but the value must valid JSON or empty. For example
45 // properties_j: "a:1" 45 // properties_j: "a:1"
46 // means property a is a number 1, not string "1". 46 // means property a is a number 1, not string "1".
47 // 47 //
48 // If empty, it means no property must be defined. In particular, it removes
49 // a default value for the property, if any.
50 //
48 // Fields properties and properties_j can be used together, but cannot both 51 // Fields properties and properties_j can be used together, but cannot both
49 // specify values for same property. 52 // specify values for same property.
50 repeated string properties_j = 4; 53 repeated string properties_j = 4;
51 } 54 }
52 55
53 message Builder { 56 message Builder {
54 // Name of the builder. Will be propagated to "builder" build tag and 57 // Name of the builder. Will be propagated to "builder" build tag and
55 // "buildername" recipe property. 58 // "buildername" recipe property.
56 optional string name = 1; 59 optional string name = 1;
57 // Builder category. Will be used for visual grouping, for example in Code R eview. 60 // Builder category. Will be used for visual grouping, for example in Code R eview.
58 optional string category = 6; 61 optional string category = 6;
59 // Will be become to swarming task tags. 62 // Will be become to swarming task tags.
60 // Each tag will end up in "swarming_tag" buildbucket tag, for example 63 // Each tag will end up in "swarming_tag" buildbucket tag, for example
61 // "swarming_tag:builder:release" 64 // "swarming_tag:builder:release"
62 repeated string swarming_tags = 2; 65 repeated string swarming_tags = 2;
63 // Colon-delimited key-value pair of task dimensions. 66 // Colon-delimited key-value pair of task dimensions.
64 // 67 //
65 // If value is not specified ("<key>:"), then it excludes a value for the 68 // If value is not specified ("<key>:"), then it excludes a default value.
66 // same key specified in common_dimensions.
67 repeated string dimensions = 3; 69 repeated string dimensions = 3;
68 // Specifies that a recipe to run. 70 // Specifies that a recipe to run.
69 optional Recipe recipe = 4; 71 optional Recipe recipe = 4;
70 // Swarming task priority. 72 // Swarming task priority.
71 optional uint32 priority = 5; 73 optional uint32 priority = 5;
72 // Maximum build execution time. Not to be confused with pending time. 74 // Maximum build execution time. Not to be confused with pending time.
73 // If not set, defaults to bucket's common_execution_timeout_secs.
74 optional uint32 execution_timeout_secs = 7; 75 optional uint32 execution_timeout_secs = 7;
75 } 76 }
76 77
77 // Hostname of the swarming instance, e.g. "chromium-swarm.appspot.com". 78 // Hostname of the swarming instance, e.g. "chromium-swarm.appspot.com".
78 optional string hostname = 1; 79 optional string hostname = 1;
79 // Used to generate a URL for Build, may contain parameters 80 // Used to generate a URL for Build, may contain parameters
80 // {swarming_hostname}, {task_id}, {bucket} and {builder}. Defaults to: 81 // {swarming_hostname}, {task_id}, {bucket} and {builder}. Defaults to:
81 // https://{swarming_hostname}/user/task/{task_id} 82 // https://{swarming_hostname}/user/task/{task_id}
82 optional string url_format = 2; 83 optional string url_format = 2;
83 84
85 // Defines default values for builders.
86 optional Builder builder_defaults = 9;
87
88 // DEPRECATED: use builder_defaults.
84 // Will be put to all swarming tasks. 89 // Will be put to all swarming tasks.
85 repeated string common_swarming_tags = 3; 90 repeated string common_swarming_tags = 3;
86 91
92 // DEPRECATED: use builder_defaults.
87 // Colon-delimited key-value pair of common task dimensions. 93 // Colon-delimited key-value pair of common task dimensions.
88 // 94 //
89 // If value is not specified ("<key>:"), then it excludes a value for the 95 // If value is not specified ("<key>:"), then it excludes a value for the
90 // same key specified in swarming task template. 96 // same key specified in swarming task template.
91 repeated string common_dimensions = 4; 97 repeated string common_dimensions = 4;
92 98
93 // Configuration for each builder. 99 // Configuration for each builder.
94 // Swarming tasks are created only for builds for builders that are not 100 // Swarming tasks are created only for builds for builders that are not
95 // explicitly specified. 101 // explicitly specified.
96 repeated Builder builders = 5; 102 repeated Builder builders = 5;
97 103
104 // DEPRECATED: use builder_defaults.
98 // Defines a default recipe for all builders in this bucket. 105 // Defines a default recipe for all builders in this bucket.
99 // A builder may override it or parts of it with something else. 106 // A builder may override it or parts of it with something else.
100 optional Recipe common_recipe = 6; 107 optional Recipe common_recipe = 6;
101 108
109 // DEPRECATED: use builder_defaults.
102 // Maximum build execution time. Not to be confused with pending time. 110 // Maximum build execution time. Not to be confused with pending time.
103 // If not set, defaults to server defaults. 111 // If not set, defaults to server defaults.
104 optional uint32 common_execution_timeout_secs = 7; 112 optional uint32 common_execution_timeout_secs = 7;
105 113
106 // Percentage of builds that should use a canary swarming task template. 114 // Percentage of builds that should use a canary swarming task template.
107 // A value from 0 to 100. 115 // A value from 0 to 100.
108 optional uint32 task_template_canary_percentage = 8; 116 optional uint32 task_template_canary_percentage = 8;
109 } 117 }
110 118
111 // Defines one bucket in buildbucket.cfg 119 // Defines one bucket in buildbucket.cfg
112 message Bucket { 120 message Bucket {
113 // Name of the bucket. Names are unique within one instance of buildbucket. 121 // Name of the bucket. Names are unique within one instance of buildbucket.
114 // If another project already uses this name, a config will be rejected. 122 // If another project already uses this name, a config will be rejected.
115 // Name reservation is first-come first-serve. 123 // Name reservation is first-come first-serve.
116 optional string name = 1; 124 optional string name = 1;
117 // List of access control rules for the bucket. 125 // List of access control rules for the bucket.
118 repeated Acl acls = 2; 126 repeated Acl acls = 2;
119 // Buildbucket-swarming integration. 127 // Buildbucket-swarming integration.
120 optional Swarming swarming = 3; 128 optional Swarming swarming = 3;
121 } 129 }
122 130
123 // Schema of buildbucket.cfg file, a project config. 131 // Schema of buildbucket.cfg file, a project config.
124 message BuildbucketCfg { 132 message BuildbucketCfg {
125 // All buckets defined for this project. 133 // All buckets defined for this project.
126 repeated Bucket buckets = 1; 134 repeated Bucket buckets = 1;
127 } 135 }
OLDNEW
« no previous file with comments | « no previous file | appengine/cr-buildbucket/proto/project_config_pb2.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698