Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: move the rest of api's core.build.proto into the public one #16

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions proto/depot/core/v1/build.proto
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
syntax = "proto3";
package depot.core.v1;

import "google/protobuf/timestamp.proto";

service BuildService {
// Share a URL to a build with users outside of your organization
rpc ShareBuild(ShareBuildRequest) returns (ShareBuildResponse);

// Stop sharing a build
rpc StopSharingBuild(StopSharingBuildRequest) returns (StopSharingBuildResponse);

// List the builds in your organization
rpc ListBuilds(ListBuildsRequest) returns (ListBuildsResponse);

// Get the build metadata of a build
rpc GetBuild(GetBuildRequest) returns (GetBuildResponse);
}

message ShareBuildRequest {
Expand All @@ -22,3 +30,43 @@ message StopSharingBuildRequest {
}

message StopSharingBuildResponse {}

message ListBuildsRequest {
string project_id = 1;
optional int32 page_size = 2;
optional string page_token = 3;
}

message ListBuildsResponse {
repeated Build builds = 1;
string next_page_token = 2;
}

message GetBuildRequest {
string build_id = 1;
}

message GetBuildResponse {
Build build = 1;
}

message Build {
string build_id = 1;
Status status = 2;
google.protobuf.Timestamp created_at = 3;
optional google.protobuf.Timestamp started_at = 4;
optional google.protobuf.Timestamp finished_at = 5;
optional int32 build_duration_seconds = 6;
optional int32 saved_duration_seconds = 7;
optional int32 cached_steps = 8;
optional int32 total_steps = 9;

enum Status {
STATUS_UNSPECIFIED = 0;
STATUS_RUNNING = 1;
STATUS_FAILED = 2;
STATUS_SUCCESS = 3;
STATUS_ERROR = 4;
STATUS_CANCELED = 5;
}
}
Loading