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: [cloudbuild] add repositoryevent to buildtrigger #4378

Merged
merged 2 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ option (google.api.resource_definition) = {
type: "pubsub.googleapis.com/Topic"
pattern: "projects/{project}/topics/{topic}"
};
option (google.api.resource_definition) = {
type: "cloudbuild.googleapis.com/Repository"
pattern: "projects/{project}/locations/{location}/connections/{connection}/repositories/{repository}"
};

// Creates and manages builds on Google Cloud Platform.
//
Expand Down Expand Up @@ -1575,6 +1579,47 @@ message BuildTrigger {
string service_account = 33 [(google.api.resource_reference) = {
type: "iam.googleapis.com/ServiceAccount"
}];

// The configuration of a trigger that creates a build whenever an event from
// Repo API is received.
RepositoryEventConfig repository_event_config = 39;
}

// The configuration of a trigger that creates a build whenever an event from
// Repo API is received.
message RepositoryEventConfig {
// All possible SCM repo types from Repo API.
enum RepositoryType {
// If unspecified, RepositoryType defaults to GITHUB.
REPOSITORY_TYPE_UNSPECIFIED = 0;

// The SCM repo is GITHUB.
GITHUB = 1;

// The SCM repo is GITHUB Enterprise.
GITHUB_ENTERPRISE = 2;

// The SCM repo is GITLAB Enterprise.
GITLAB_ENTERPRISE = 3;
}

// The resource name of the Repo API resource.
string repository = 1 [(google.api.resource_reference) = {
type: "cloudbuild.googleapis.com/Repository"
}];

// Output only. The type of the SCM vendor the repository points to.
RepositoryType repository_type = 2
[(google.api.field_behavior) = OUTPUT_ONLY];

// The types of filter to trigger a build.
oneof filter {
// Filter to match changes in pull requests.
PullRequestFilter pull_request = 3;

// Filter to match changes in refs like branches, tags.
PushFilter push = 4;
}
}

// GitHubEventsConfig describes the configuration of a trigger that creates a
Expand Down
135 changes: 135 additions & 0 deletions packages/google-devtools-cloudbuild/protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading