-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/relui: add proto definition for workflows
Using configuration for our workflows will help separate concerns between implementation and workflow configuration. Eventually, similar tasks can be re-used in different workflows, such as fetching from Git, updating the VERSION file, or publishing a tag. The current configuration definition is mainly illustrative, and is expected to change as we build out a prototype. For golang/go#40279 Change-Id: I5c6f8a18571ab819de0b1d026c86050735efeed9 Reviewed-on: https://go-review.googlesource.com/c/build/+/243340 Run-TryBot: Alexander Rakoczy <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Andrew Bonventre <[email protected]>
- Loading branch information
Showing
10 changed files
with
458 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright 2020 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
package protos | ||
|
||
// Run "go generate" in this directory to update. You need to have: | ||
// | ||
// - a protoc binary (see https://github.com/golang/protobuf#installation) | ||
// - go get -u github.com/golang/protobuf/protoc-gen-go | ||
|
||
//go:generate protoc --proto_path=$GOPATH/src:. --go_out=plugins=grpc:. relui.proto |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Copyright 2020 The Go 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 = "proto3"; | ||
|
||
package protos; | ||
|
||
message Workflow { | ||
// name is a unique name for a workflow, such as local_go_release. The name must be unique across | ||
// all workflow configurations. | ||
string name = 1; | ||
|
||
// buildable_asks is a list of tasks to be performed by the workflow. | ||
repeated BuildableTask buildable_tasks = 2; | ||
|
||
// params are parameters provided when creating a workflow. | ||
map<string, string> params = 3; | ||
} | ||
|
||
message BuildableTask { | ||
// name is a unique name for a task, such as fetch_go_source. The name must be unique across | ||
// all workflow configurations. | ||
string name = 1; | ||
|
||
// depends_on is the name of a task this task depends on. Artifacts from the depends_on task will be available | ||
// to this task. | ||
string depends_on = 2; | ||
|
||
// task_status is the current status of a task. | ||
TaskStatus status = 3; | ||
|
||
// artifact_url is an optional URL to an artifact published by this task. | ||
string artifact_url = 4; | ||
|
||
// git_source is an optional configuration for which git source to fetch. | ||
GitSource git_source = 5; | ||
|
||
// task_type is a unique type for a task, such as FetchGerritSource. Types are used by task runners to identify | ||
// how to execute a task. | ||
string task_type = 6; | ||
} | ||
|
||
message GitSource { | ||
string url = 1; | ||
string ref = 2; | ||
} | ||
|
||
enum TaskStatus { | ||
TASK_STATUS_UNKNOWN = 0; | ||
TASK_STATUS_CREATED = 1; | ||
TASK_STATUS_STARTED = 2; | ||
} |
Oops, something went wrong.