go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/led/job/job.proto (about) 1 // Copyright 2020 The LUCI Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 syntax = "proto3"; 16 17 package job; 18 option go_package = "go.chromium.org/luci/led/job;job"; 19 20 import "google/protobuf/duration.proto"; 21 22 import "go.chromium.org/luci/buildbucket/proto/launcher.proto"; 23 import "go.chromium.org/luci/swarming/proto/api_v2/swarming.proto"; 24 25 // Buildbucket is, ideally, just a BBAgentArgs, but there are bits of data that 26 // led needs to track which aren't currently contained in BBAgentArgs. 27 // 28 // Where it makes sense, this additional data should be moved from this 29 // Buildbucket message into BBAgentArgs, but for now we store it separately to 30 // get led v2 up and running. 31 message Buildbucket { 32 buildbucket.v2.BBAgentArgs bbagent_args = 1; 33 34 // Deprecated for Buildbucket v2 builds. 35 repeated swarming.v2.CipdPackage cipd_packages = 2; 36 37 repeated swarming.v2.StringPair env_vars = 3; 38 repeated swarming.v2.StringListPair env_prefixes = 4; 39 // Deprecated. 40 // TODO(crbug.com/1345722): remove this. 41 repeated string extra_tags = 5; 42 43 google.protobuf.Duration bot_ping_tolerance = 7; 44 45 swarming.v2.Containment containment = 8; 46 47 // Indicates that this build should be generated as a legacy kitchen task when 48 // launched. 49 bool legacy_kitchen = 9; 50 51 // Eventually becomes the name of the launched swarming task. 52 string name = 10; 53 54 // This field contains the path relative to ${ISOLATED_OUTDIR} for the final 55 // build.proto result. If blank, will cause the job not to emit any build 56 // proto to the output directory. 57 // 58 // For bbagent-based jobs this must have the file extension ".pb", ".textpb" 59 // or ".json", to get the respective encoding. 60 // 61 // For legacy kitchen jobs this must have the file extension ".json". 62 // 63 // By default, led will populate this with "build.proto.json". 64 string final_build_proto_path = 11; 65 66 // Indicates that this build should be generated as a real buildbucket build 67 // instead of a raw swarming task. 68 bool real_build = 12; 69 } 70 71 // Swarming is the raw TaskRequest. When a Definition is in this form, the 72 // user's ability to manipulate it via `led` subcommands is extremely limited. 73 message Swarming { 74 swarming.v2.NewTaskRequest task = 1; 75 76 string hostname = 2; 77 78 // If set, this holds the CASReference to use with the job, when launched. 79 // 80 // At the time of launch, this will be merged with 81 // swarming.task_slice[*].properties.cas_input_root, if any. 82 swarming.v2.CASReference cas_user_payload = 3; 83 } 84 85 message Definition { 86 oneof job_type { 87 // Represents a buildbucket-native task; May be recovered from a swarming 88 // task, or provided directly via buildbucket. 89 Buildbucket buildbucket = 1; 90 91 // Represents a swarming task. This will be filled for jobs sourced directly 92 // from swarming which weren't recognized as a buildbucket task. 93 // 94 // A limited subset of the edit and info functionality is available for 95 // raw swarming jobs. 96 Swarming swarming = 2; 97 } 98 }