|
1 | | -// Copyright 2021 Google LLC |
| 1 | +// Copyright 2023 Google LLC |
2 | 2 | // |
3 | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 4 | // you may not use this file except in compliance with the License. |
@@ -412,6 +412,32 @@ message StorageSource { |
412 | 412 | int64 generation = 3; |
413 | 413 | } |
414 | 414 |
|
| 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 | + |
415 | 441 | // Location of the source in a Google Cloud Source Repository. |
416 | 442 | message RepoSource { |
417 | 443 | // ID of the project that owns the Cloud Source Repository. If omitted, the |
@@ -485,6 +511,9 @@ message Source { |
485 | 511 | // Repository. |
486 | 512 | RepoSource repo_source = 3; |
487 | 513 |
|
| 514 | + // If provided, get the source from this Git repository. |
| 515 | + GitSource git_source = 5; |
| 516 | + |
488 | 517 | // If provided, get the source from this manifest in Google Cloud Storage. |
489 | 518 | // This feature is in Preview; see description |
490 | 519 | // [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher). |
|
0 commit comments