Skip to content

Commit

Permalink
feat: [cloudbuild] Add PeeredNetworkIpRange to NetworkConfigs message (
Browse files Browse the repository at this point in the history
…#4181)

* feat: Update third party clodubuild.proto library to include git_source

Committer: @monicaliu
PiperOrigin-RevId: 524851242

Source-Link: googleapis/googleapis@5333983

Source-Link: googleapis/googleapis-gen@41cced8
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWRldnRvb2xzLWNsb3VkYnVpbGQvLk93bEJvdC55YW1sIiwiaCI6IjQxY2NlZDgzZjc1OTRhMzljNTkwYzM4ZGM4YzNmOTA1OTg1YzY5NzkifQ==

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: Add PeeredNetworkIpRange to NetworkConfigs message
feat: Add NpmPackages to Artifact and Results messages and new SHA512 hash type
docs: Various doc updates

Committer: @giangnguyen
PiperOrigin-RevId: 525153459

Source-Link: googleapis/googleapis@0c7c7df

Source-Link: googleapis/googleapis-gen@8d2d20f
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWRldnRvb2xzLWNsb3VkYnVpbGQvLk93bEJvdC55YW1sIiwiaCI6IjhkMmQyMGY1MGM1ODU3NzVlNTA2YjYxYmI0M2U5ZTQ5MjI3OTUzNTQifQ==

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Denis DelGrosso <[email protected]>
  • Loading branch information
3 people authored Apr 19, 2023
1 parent 3c46888 commit 01fa5eb
Show file tree
Hide file tree
Showing 10 changed files with 1,530 additions and 131 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,8 +32,8 @@ option go_package = "cloud.google.com/go/cloudbuild/apiv1/v2/apiv1pb;apiv1pb";
option java_multiple_files = true;
option java_package = "com.google.cloudbuild.v1";
option objc_class_prefix = "GCB";
option ruby_package = "Google::Cloud::Build::V1";
option php_namespace = "Google\\Cloud\\Build\\V1";
option ruby_package = "Google::Cloud::Build::V1";
option (google.api.resource_definition) = {
type: "compute.googleapis.com/Network"
pattern: "projects/{project}/global/networks/{network}"
Expand Down Expand Up @@ -412,6 +412,32 @@ message StorageSource {
int64 generation = 3;
}

// Location of the source in any accessible Git repository.
message GitSource {
// Location of the Git repo to build.
//
// This will be used as a `git remote`, see
// https://git-scm.com/docs/git-remote.
string url = 1;

// Directory, relative to the source root, in which to run the build.
//
// This must be a relative path. If a step's `dir` is specified and is an
// absolute path, this value is ignored for that step's execution.
string dir = 5;

// The revision to fetch from the Git repository such as a branch, a tag, a
// commit SHA, or any Git ref.
//
// Cloud Build uses `git fetch` to fetch the revision from the Git
// repository; therefore make sure that the string you provide for `revision`
// is parsable by the command. For information on string values accepted by
// `git fetch`, see
// https://git-scm.com/docs/gitrevisions#_specifying_revisions. For
// information on `git fetch`, see https://git-scm.com/docs/git-fetch.
string revision = 6;
}

// Location of the source in a Google Cloud Source Repository.
message RepoSource {
// ID of the project that owns the Cloud Source Repository. If omitted, the
Expand Down Expand Up @@ -485,6 +511,9 @@ message Source {
// Repository.
RepoSource repo_source = 3;

// If provided, get the source from this Git repository.
GitSource git_source = 5;

// If provided, get the source from this manifest in Google Cloud Storage.
// This feature is in Preview; see description
// [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher).
Expand Down Expand Up @@ -529,6 +558,19 @@ message UploadedMavenArtifact {
TimeSpan push_timing = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// An npm package uploaded to Artifact Registry using the NpmPackage
// directive.
message UploadedNpmPackage {
// URI of the uploaded npm package.
string uri = 1;

// Hash types and values of the npm package.
FileHashes file_hashes = 2;

// Output only. Stores timing information for pushing the specified artifact.
TimeSpan push_timing = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// A step in the build pipeline.
message BuildStep {
// Required. The name of the container image that will run this particular
Expand Down Expand Up @@ -669,10 +711,12 @@ message Results {
// indices.
repeated string build_step_images = 3;

// Path to the artifact manifest. Only populated when artifacts are uploaded.
// Path to the artifact manifest for non-container artifacts uploaded to Cloud
// Storage. Only populated when artifacts are uploaded to Cloud Storage.
string artifact_manifest = 4;

// Number of artifacts uploaded. Only populated when artifacts are uploaded.
// Number of non-container artifacts uploaded to Cloud Storage. Only populated
// when artifacts are uploaded to Cloud Storage.
int64 num_artifacts = 5;

// List of build step outputs, produced by builder images, in the order
Expand All @@ -683,14 +727,17 @@ message Results {
// Only the first 4KB of data is stored.
repeated bytes build_step_outputs = 6;

// Time to push all non-container artifacts.
// Time to push all non-container artifacts to Cloud Storage.
TimeSpan artifact_timing = 7;

// Python artifacts uploaded to Artifact Registry at the end of the build.
repeated UploadedPythonPackage python_packages = 8;

// Maven artifacts uploaded to Artifact Registry at the end of the build.
repeated UploadedMavenArtifact maven_artifacts = 9;

// Npm packages uploaded to Artifact Registry at the end of the build.
repeated UploadedNpmPackage npm_packages = 12;
}

// An artifact that was uploaded during a build. This
Expand All @@ -716,6 +763,7 @@ message ArtifactResult {
//
// - $PROJECT_ID: the project ID of the build.
// - $PROJECT_NUMBER: the project number of the build.
// - $LOCATION: the location/region of the build.
// - $BUILD_ID: the autogenerated ID of the build.
// - $REPO_NAME: the source repository name specified by RepoSource.
// - $BRANCH_NAME: the branch name specified by RepoSource.
Expand All @@ -730,6 +778,40 @@ message Build {
pattern: "projects/{project}/locations/{location}/builds/{build}"
};

// Possible status of a build or build step.
enum Status {
// Status of the build is unknown.
STATUS_UNKNOWN = 0;

// Build has been created and is pending execution and queuing. It has not
// been queued.
PENDING = 10;

// Build or step is queued; work has not yet begun.
QUEUED = 1;

// Build or step is being executed.
WORKING = 2;

// Build or step finished successfully.
SUCCESS = 3;

// Build or step failed to complete successfully.
FAILURE = 4;

// Build or step failed due to an internal cause.
INTERNAL_ERROR = 5;

// Build or step took longer than was allowed.
TIMEOUT = 6;

// Build or step was canceled by a user.
CANCELLED = 7;

// Build was enqueued for longer than the value of `queue_ttl`.
EXPIRED = 9;
}

// A non-fatal problem encountered during the execution of the build.
message Warning {
// The relative importance of this warning.
Expand Down Expand Up @@ -788,40 +870,6 @@ message Build {
string detail = 2;
}

// Possible status of a build or build step.
enum Status {
// Status of the build is unknown.
STATUS_UNKNOWN = 0;

// Build has been created and is pending execution and queuing. It has not
// been queued.
PENDING = 10;

// Build or step is queued; work has not yet begun.
QUEUED = 1;

// Build or step is being executed.
WORKING = 2;

// Build or step finished successfully.
SUCCESS = 3;

// Build or step failed to complete successfully.
FAILURE = 4;

// Build or step failed due to an internal cause.
INTERNAL_ERROR = 5;

// Build or step took longer than was allowed.
TIMEOUT = 6;

// Build or step was canceled by a user.
CANCELLED = 7;

// Build was enqueued for longer than the value of `queue_ttl`.
EXPIRED = 9;
}

// Output only. The 'Build' name with format:
// `projects/{project}/locations/{location}/builds/{build}`, where {build}
// is a unique identifier generated by the service.
Expand Down Expand Up @@ -869,7 +917,7 @@ message Build {
//
// `timeout` starts ticking from `startTime`.
//
// Default time is ten minutes.
// Default time is 60 minutes.
google.protobuf.Duration timeout = 12;

// A list of images to be pushed upon the successful completion of all build
Expand Down Expand Up @@ -932,7 +980,8 @@ message Build {
// are:
//
// * BUILD: time to execute all build steps.
// * PUSH: time to push all specified images.
// * PUSH: time to push all artifacts including docker images and non docker
// artifacts.
// * FETCHSOURCE: time to fetch source.
// * SETUPBUILD: time to set up build.
//
Expand Down Expand Up @@ -1032,6 +1081,21 @@ message Artifacts {
repeated string paths = 2;
}

// Npm package to upload to Artifact Registry upon successful completion
// of all build steps.
message NpmPackage {
// Artifact Registry repository, in the form
// "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY"
//
// Npm package in the workspace specified by path will be zipped and
// uploaded to Artifact Registry with this location as a prefix.
string repository = 1;

// Path to the package.json.
// e.g. workspace/path/to/package
string package_path = 2;
}

// A list of images to be pushed upon the successful completion of all build
// steps.
//
Expand Down Expand Up @@ -1073,6 +1137,16 @@ message Artifacts {
//
// If any objects fail to be pushed, the build is marked FAILURE.
repeated PythonPackage python_packages = 5;

// A list of npm packages to be uploaded to Artifact Registry upon
// successful completion of all build steps.
//
// Npm packages in the specified paths will be uploaded
// to the specified Artifact Registry repository using the builder service
// account's credentials.
//
// If any packages fail to be pushed, the build is marked FAILURE.
repeated NpmPackage npm_packages = 6;
}

// Start and end times for a build execution phase.
Expand Down Expand Up @@ -1139,6 +1213,9 @@ message Hash {

// Use a md5 hash.
MD5 = 2;

// Use a sha512 hash.
SHA512 = 4;
}

// The type of hash that was performed.
Expand Down Expand Up @@ -1241,7 +1318,7 @@ message GetBuildRequest {
// Request to list builds.
message ListBuildsRequest {
// The parent of the collection of `Builds`.
// Format: `projects/{project}/locations/location`
// Format: `projects/{project}/locations/{location}`
string parent = 9 [(google.api.resource_reference) = {
child_type: "cloudbuild.googleapis.com/Build"
}];
Expand Down Expand Up @@ -1769,10 +1846,10 @@ message BuildOptions {

// Specifies the manner in which the build should be verified, if at all.
enum VerifyOption {
// Not a verifiable build. (default)
// Not a verifiable build (the default).
NOT_VERIFIED = 0;

// Verified build.
// Build must be verified.
VERIFIED = 1;
}

Expand Down Expand Up @@ -1825,18 +1902,18 @@ message BuildOptions {
// rely on the default logging behavior as it may change in the future.
LOGGING_UNSPECIFIED = 0;

// Cloud Logging and Cloud Storage logging are enabled.
// Build logs are stored in Cloud Logging and Cloud Storage.
LEGACY = 1;

// Only Cloud Storage logging is enabled.
// Build logs are stored in Cloud Storage.
GCS_ONLY = 2;

// This option is the same as CLOUD_LOGGING_ONLY.
STACKDRIVER_ONLY = 3 [deprecated = true];

// Only Cloud Logging is enabled. Note that logs for both the Cloud Console
// UI and Cloud SDK are based on Cloud Storage logs, so neither will provide
// logs if this option is chosen.
// Build logs are stored in Cloud Logging. Selecting this option will not
// allow [logs
// streaming](https://cloud.google.com/sdk/gcloud/reference/builds/log).
CLOUD_LOGGING_ONLY = 5;

// Turn off all logging. No build logs will be captured.
Expand Down Expand Up @@ -1867,7 +1944,7 @@ message BuildOptions {
// "disk free"; some of the space will be used by the operating system and
// build utilities. Also note that this is the minimum disk size that will be
// allocated for the build -- the build may run with a larger disk than
// requested. At present, the maximum disk size is 1000GB; builds that request
// requested. At present, the maximum disk size is 2000GB; builds that request
// more than the maximum are rejected with an error.
int64 disk_size_gb = 6;

Expand Down Expand Up @@ -1928,7 +2005,7 @@ message BuildOptions {
// it is indicative of a build request with an incorrect configuration.
repeated Volume volumes = 14;

// Option to specify how default logs buckets are setup.
// Optional. Option to specify how default logs buckets are setup.
DefaultLogsBucketBehavior default_logs_bucket_behavior = 21
[(google.api.field_behavior) = OPTIONAL];
}
Expand Down Expand Up @@ -2033,9 +2110,9 @@ message WorkerPool {
// Output only. `WorkerPool` state.
State state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];

// Private Pool configuration for the `WorkerPool`.
// Configuration for the `WorkerPool`.
oneof config {
// Private Pool using a v1 configuration.
// Legacy Private Pool configuration.
PrivatePoolV1Config private_pool_v1_config = 12;
}

Expand All @@ -2059,7 +2136,7 @@ message PrivatePoolV1Config {
// Size of the disk attached to the worker, in GB.
// See [Worker pool config
// file](https://cloud.google.com/build/docs/private-pools/worker-pool-config-file-schema).
// Specify a value of up to 1000. If `0` is specified, Cloud Build will use
// Specify a value of up to 2000. If `0` is specified, Cloud Build will use
// a standard disk size.
int64 disk_size_gb = 2;
}
Expand Down Expand Up @@ -2098,6 +2175,17 @@ message PrivatePoolV1Config {

// Option to configure network egress for the workers.
EgressOption egress_option = 2;

// Immutable. Subnet IP range within the peered network. This is specified
// in CIDR notation with a slash and the subnet prefix size. You can
// optionally specify an IP address before the subnet prefix value. e.g.
// `192.168.0.0/29` would specify an IP range starting at 192.168.0.0 with a
// prefix size of 29 bits.
// `/16` would specify a prefix size of 16 bits, with an automatically
// determined IP within the peered VPC.
// If unspecified, a value of `/24` will be used.
string peered_network_ip_range = 3
[(google.api.field_behavior) = IMMUTABLE];
}

// Machine configuration for the workers in the pool.
Expand Down Expand Up @@ -2152,7 +2240,7 @@ message GetWorkerPoolRequest {
message DeleteWorkerPoolRequest {
// Required. The name of the `WorkerPool` to delete.
// Format:
// `projects/{project}/locations/{workerPool}/workerPools/{workerPool}`.
// `projects/{project}/locations/{location}/workerPools/{workerPool}`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down
Loading

0 comments on commit 01fa5eb

Please sign in to comment.