Skip to content

Commit

Permalink
feat: move the rest of api's core.build.proto into the public one
Browse files Browse the repository at this point in the history
  • Loading branch information
William Batista authored and William Batista committed Oct 21, 2024
1 parent 0003fc0 commit 3568efc
Showing 1 changed file with 48 additions and 0 deletions.
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;
}
}

0 comments on commit 3568efc

Please sign in to comment.