Skip to content

Commit 5333983

Browse files
Google APIscopybara-github
authored andcommitted
feat: Update third party clodubuild.proto library to include git_source
Committer: @monicaliu PiperOrigin-RevId: 524851242
1 parent 52180f8 commit 5333983

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

google/devtools/cloudbuild/v1/cloudbuild.proto

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2021 Google LLC
1+
// Copyright 2023 Google LLC
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -412,6 +412,32 @@ message StorageSource {
412412
int64 generation = 3;
413413
}
414414

415+
// Location of the source in any accessible Git repository.
416+
message GitSource {
417+
// Location of the Git repo to build.
418+
//
419+
// This will be used as a `git remote`, see
420+
// https://git-scm.com/docs/git-remote.
421+
string url = 1;
422+
423+
// Directory, relative to the source root, in which to run the build.
424+
//
425+
// This must be a relative path. If a step's `dir` is specified and is an
426+
// absolute path, this value is ignored for that step's execution.
427+
string dir = 5;
428+
429+
// The revision to fetch from the Git repository such as a branch, a tag, a
430+
// commit SHA, or any Git ref.
431+
//
432+
// Cloud Build uses `git fetch` to fetch the revision from the Git
433+
// repository; therefore make sure that the string you provide for `revision`
434+
// is parsable by the command. For information on string values accepted by
435+
// `git fetch`, see
436+
// https://git-scm.com/docs/gitrevisions#_specifying_revisions. For
437+
// information on `git fetch`, see https://git-scm.com/docs/git-fetch.
438+
string revision = 6;
439+
}
440+
415441
// Location of the source in a Google Cloud Source Repository.
416442
message RepoSource {
417443
// ID of the project that owns the Cloud Source Repository. If omitted, the
@@ -485,6 +511,9 @@ message Source {
485511
// Repository.
486512
RepoSource repo_source = 3;
487513

514+
// If provided, get the source from this Git repository.
515+
GitSource git_source = 5;
516+
488517
// If provided, get the source from this manifest in Google Cloud Storage.
489518
// This feature is in Preview; see description
490519
// [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher).

0 commit comments

Comments
 (0)