| // Copyright 2021 The LUCI Authors. All rights reserved. |
| // Use of this source code is governed under the Apache License, Version 2.0 |
| // that can be found in the LICENSE file. |
| |
| syntax = "proto3"; |
| |
| import "google/protobuf/struct.proto"; |
| |
| import "go.chromium.org/luci/buildbucket/proto/builder_common.proto"; |
| import "go.chromium.org/luci/buildbucket/proto/common.proto"; |
| |
| package recipes.recipe_engine.placeholder; |
| |
| enum LifeTime { |
| // This build shouldn't exceed the life of its parent. |
| BUILD_BOUND = 0; |
| |
| // This build's lifetime shouldn't be bound to its parent. |
| DETACHED = 1; |
| } |
| |
| message Buildbucket { |
| buildbucket.v2.BuilderID builder = 1; |
| } |
| |
| // ChildBuild represents a step which triggers a child build. |
| message ChildBuild { |
| string id = 1; |
| LifeTime life_time = 2; |
| // swarming, RBE here later |
| oneof trigger { |
| Buildbucket buildbucket = 10; |
| } |
| } |
| |
| // CollectChildren represents a step which waits for child build(s). |
| message CollectChildren { |
| // Ids of the child build step this step should collect. |
| repeated string child_build_step_ids = 1; |
| } |
| |
| message FakeStep { |
| // The amount of time this fake step should "run" for. |
| // |
| // This will translate to a real-life pause in the execution of the recipe. |
| int64 duration_secs = 1; |
| |
| // Sets text on this step in the UI. |
| string step_text = 2; |
| |
| // Named links to add to the step. |
| map<string, string> links = 3; |
| |
| // Named logs to add to the step. |
| // |
| // Multi-line values are acceptable. |
| map<string, string> logs = 4; |
| |
| // Status for the step. |
| // |
| // FAILURE/INFRA_FAILURE/CANCELED does not affect the evaluation of the rest |
| // of the steps. |
| buildbucket.v2.Status status = 5; |
| |
| // Indicate that this step was canceled. |
| // |
| // Shows up in the Step's "status_details" field. |
| bool canceled = 6; |
| |
| // Indicate that this step had a timeout. |
| // |
| // Shows up in the Step's "status_details" field. |
| bool timeout = 7; |
| |
| // This step should set the following output properties when it runs. |
| google.protobuf.Struct set_properties = 8; |
| |
| // Children of this step; duration_secs will apply prior to running |
| // any children. |
| repeated Step children = 9; |
| |
| // Arbitrary annotations for the step. |
| // |
| // One key may have multiple values, which is why this is not a map<string,string>. |
| // |
| // These are NOT interpreted by Buildbucket. |
| // |
| // Tag keys SHOULD indicate the domain/system that interprets them, e.g.: |
| // |
| // my_service.category = COMPILE |
| // |
| // Rather than |
| // |
| // is_compile = true |
| // |
| // This will help contextualize the tag values when looking at a build (who |
| // set this tag? who will interpret this tag?)) |
| // |
| // The 'luci.' key prefix is reserved for LUCI's own usage. |
| // |
| // The Key may not exceed 256 bytes. |
| // The Value may not exceed 1024 bytes. |
| // |
| // Key and Value may not be empty. |
| map<string, string> tags = 10; |
| } |
| |
| message Step { |
| // The name of a fake placeholder step. |
| string name = 1; |
| |
| oneof type { |
| FakeStep fake_step = 2; |
| ChildBuild child_build = 3; |
| CollectChildren collect_children = 4; |
| } |
| } |
| |
| message InputProps { |
| // A list of steps to simulate. |
| // |
| // If empty, will run a single Step like: |
| // |
| // Step { |
| // name: "hello world" |
| // duration_secs: 10 |
| // } |
| repeated Step steps = 1; |
| |
| // Overall status for the build. |
| buildbucket.v2.Status status = 4; |
| } |
| |