Types for Google Cloud Devtools Cloudbuild v1 API¶
- class google.cloud.devtools.cloudbuild_v1.types.ApprovalConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
ApprovalConfig describes configuration for manual approval of a build.
- class google.cloud.devtools.cloudbuild_v1.types.ApprovalResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
ApprovalResult describes the decision and associated metadata of a manual approval of a build.
- approver_account¶
Output only. Email of the user that called the ApproveBuild API to approve or reject a build at the time that the API was called.
- Type
- approval_time¶
Output only. The time when the approval decision was made.
- decision¶
Required. The decision of this manual approval.
- url¶
Optional. An optional URL tied to this manual approval result. This field is essentially the same as comment, except that it will be rendered by the UI differently. An example use case is a link to an external job that approved this Build.
- Type
- class Decision(value)[source]¶
Bases:
proto.enums.Enum
Specifies whether or not this manual approval result is to approve or reject a build.
- Values:
- DECISION_UNSPECIFIED (0):
Default enum type. This should not be used.
- APPROVED (1):
Build is approved.
- REJECTED (2):
Build is rejected.
- class google.cloud.devtools.cloudbuild_v1.types.ApproveBuildRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request to approve or reject a pending build.
- name¶
Required. Name of the target build. For example: “projects/{$project_id}/builds/{$build_id}”.
- Type
- approval_result¶
Approval decision and metadata.
- class google.cloud.devtools.cloudbuild_v1.types.ArtifactResult(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An artifact that was uploaded during a build. This is a single record in the artifact manifest JSON file.
- location¶
The path of an artifact in a Cloud Storage bucket, with the generation number. For example,
gs://mybucket/path/to/output.jar#generation
.- Type
- file_hash¶
The file hash of the artifact.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.FileHashes]
- class google.cloud.devtools.cloudbuild_v1.types.Artifacts(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Artifacts produced by a build that should be uploaded upon successful completion of all build steps.
- images¶
A list of images to be pushed upon the successful completion of all build steps.
The images will be pushed using the builder service account’s credentials.
The digests of the pushed images will be stored in the Build resource’s results field.
If any of the images fail to be pushed, the build is marked FAILURE.
- Type
MutableSequence[str]
- objects¶
A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps.
Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account’s credentials.
The location and generation of the uploaded objects will be stored in the Build resource’s results field.
If any objects fail to be pushed, the build is marked FAILURE.
- maven_artifacts¶
A list of Maven artifacts to be uploaded to Artifact Registry upon successful completion of all build steps.
Artifacts in the workspace matching specified paths globs will be uploaded to the specified Artifact Registry repository using the builder service account’s credentials.
If any artifacts fail to be pushed, the build is marked FAILURE.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Artifacts.MavenArtifact]
- python_packages¶
A list of Python packages to be uploaded to Artifact Registry upon successful completion of all build steps.
The build service account credentials will be used to perform the upload.
If any objects fail to be pushed, the build is marked FAILURE.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Artifacts.PythonPackage]
- npm_packages¶
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.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Artifacts.NpmPackage]
- class ArtifactObjects(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Files in the workspace to upload to Cloud Storage upon successful completion of all build steps.
- location¶
Cloud Storage bucket and optional object path, in the form “gs://bucket/path/to/somewhere/”. (see Bucket Name Requirements).
Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.
- Type
- timing¶
Output only. Stores timing information for pushing all artifact objects.
- class MavenArtifact(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A Maven artifact to upload to Artifact Registry upon successful completion of all build steps.
- repository¶
Artifact Registry repository, in the form “https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY”
Artifact in the workspace specified by path will be uploaded to Artifact Registry with this location as a prefix.
- Type
- path¶
Path to an artifact in the build’s workspace to be uploaded to Artifact Registry. This can be either an absolute path, e.g. /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar or a relative path from /workspace, e.g. my-app/target/my-app-1.0.SNAPSHOT.jar.
- Type
- class NpmPackage(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Npm package to upload to Artifact Registry upon successful completion of all build steps.
- repository¶
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.
- Type
- class PythonPackage(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Python package to upload to Artifact Registry upon successful completion of all build steps. A package can encapsulate multiple objects to be uploaded to a single repository.
- repository¶
Artifact Registry repository, in the form “https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY”
Files in the workspace matching any path pattern will be uploaded to Artifact Registry with this location as a prefix.
- Type
- class google.cloud.devtools.cloudbuild_v1.types.Build(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A build resource in the Cloud Build API.
At a high level, a
Build
describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts.Fields can include the following variables, which will be expanded when the build is created:
$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.
$TAG_NAME: the tag name specified by RepoSource.
$REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag.
$SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.
- name¶
Output only. The ‘Build’ name with format:
projects/{project}/locations/{location}/builds/{build}
, where {build} is a unique identifier generated by the service.- Type
- status¶
Output only. Status of the build.
- source¶
The location of the source files to build.
- steps¶
Required. The operations to be performed on the workspace.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.BuildStep]
- results¶
Output only. Results of the build.
- create_time¶
Output only. Time at which the request to create the build was received.
- start_time¶
Output only. Time at which execution of the build was started.
- finish_time¶
Output only. Time at which execution of the build was finished.
The difference between finish_time and start_time is the duration of the build’s execution.
- timeout¶
Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be
TIMEOUT
.timeout
starts ticking fromstartTime
.Default time is 60 minutes.
- images¶
A list of images to be pushed upon the successful completion of all build steps.
The images are pushed using the builder service account’s credentials.
The digests of the pushed images will be stored in the
Build
resource’s results field.If any of the images fail to be pushed, the build status is marked
FAILURE
.- Type
MutableSequence[str]
- queue_ttl¶
TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be
EXPIRED
.The TTL starts ticking from create_time.
- artifacts¶
Artifacts produced by the build that should be uploaded upon successful completion of all build steps.
- logs_bucket¶
Cloud Storage bucket where logs should be written (see Bucket Name Requirements). Logs file names will be of the format
${logs_bucket}/log-${build_id}.txt
.- Type
- source_provenance¶
Output only. A permanent fixed identifier for source.
- build_trigger_id¶
Output only. The ID of the
BuildTrigger
that triggered this build, if it was triggered automatically.- Type
- options¶
Special options for this build.
- secrets¶
Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use
available_secrets
to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Secret]
- timing¶
Output only. Stores timing information for phases of the build. Valid keys are:
BUILD: time to execute all build steps.
PUSH: time to push all artifacts including docker images and non docker artifacts.
FETCHSOURCE: time to fetch source.
SETUPBUILD: time to set up build.
If the build does not specify source or images, these keys will not be included.
- Type
MutableMapping[str, google.cloud.devtools.cloudbuild_v1.types.TimeSpan]
- approval¶
Output only. Describes this build’s approval configuration, status, and result.
- service_account¶
IAM service account whose credentials will be used at build runtime. Must be of the format
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}
. ACCOUNT can be email address or uniqueId of the service account.- Type
- available_secrets¶
Secrets and secret environment variables.
- warnings¶
Output only. Non-fatal problems encountered during the execution of the build.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Build.Warning]
- failure_info¶
Output only. Contains information about the build when status=FAILURE.
- class FailureInfo(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A fatal problem encountered during the execution of the build.
- type_¶
The name of the failure.
- class FailureType(value)[source]¶
Bases:
proto.enums.Enum
The name of a fatal problem encountered during the execution of the build.
- Values:
- FAILURE_TYPE_UNSPECIFIED (0):
Type unspecified
- PUSH_FAILED (1):
Unable to push the image to the repository.
- PUSH_IMAGE_NOT_FOUND (2):
Final image not found.
- PUSH_NOT_AUTHORIZED (3):
Unauthorized push of the final image.
- LOGGING_FAILURE (4):
Backend logging failures. Should retry.
- USER_BUILD_STEP (5):
A build step has failed.
- FETCH_SOURCE_FAILED (6):
The source fetching has failed.
- class Status(value)[source]¶
Bases:
proto.enums.Enum
Possible status of a build or build step.
- Values:
- STATUS_UNKNOWN (0):
Status of the build is unknown.
- PENDING (10):
Build has been created and is pending execution and queuing. It has not been queued.
- QUEUED (1):
Build or step is queued; work has not yet begun.
- WORKING (2):
Build or step is being executed.
- SUCCESS (3):
Build or step finished successfully.
- FAILURE (4):
Build or step failed to complete successfully.
- INTERNAL_ERROR (5):
Build or step failed due to an internal cause.
- TIMEOUT (6):
Build or step took longer than was allowed.
- CANCELLED (7):
Build or step was canceled by a user.
- EXPIRED (9):
Build was enqueued for longer than the value of
queue_ttl
.
- class SubstitutionsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class TimingEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class Warning(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A non-fatal problem encountered during the execution of the build.
- priority¶
The priority for this warning.
- class Priority(value)[source]¶
Bases:
proto.enums.Enum
The relative importance of this warning.
- Values:
- PRIORITY_UNSPECIFIED (0):
Should not be used.
- INFO (1):
e.g. deprecation warnings and alternative feature highlights.
- WARNING (2):
e.g. automated detection of possible issues with the build.
- ALERT (3):
e.g. alerts that a feature used in the build is pending removal
- class google.cloud.devtools.cloudbuild_v1.types.BuildApproval(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
BuildApproval describes a build’s approval configuration, state, and result.
- state¶
Output only. The state of this build’s approval.
- config¶
Output only. Configuration for manual approval of this build.
- result¶
Output only. Result of manual approval for this Build.
- class State(value)[source]¶
Bases:
proto.enums.Enum
Specifies the current state of a build’s approval.
- Values:
- STATE_UNSPECIFIED (0):
Default enum type. This should not be used.
- PENDING (1):
Build approval is pending.
- APPROVED (2):
Build approval has been approved.
- REJECTED (3):
Build approval has been rejected.
- CANCELLED (5):
Build was cancelled while it was still pending approval.
- class google.cloud.devtools.cloudbuild_v1.types.BuildOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for build operations.
- build¶
The build that the operation is tracking.
- class google.cloud.devtools.cloudbuild_v1.types.BuildOptions(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Optional arguments to enable specific features of builds.
- source_provenance_hash¶
Requested hash for SourceProvenance.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Hash.HashType]
- requested_verify_option¶
Requested verifiability options.
- machine_type¶
Compute Engine machine type on which to run the build.
- disk_size_gb¶
Requested disk size for the VM that runs the build. Note that this is NOT “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 2000GB; builds that request more than the maximum are rejected with an error.
- Type
- substitution_option¶
Option to specify behavior when there is an error in the substitution checks.
NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.
- dynamic_substitutions¶
Option to specify whether or not to apply bash style string operations to the substitutions.
NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.
- Type
- automap_substitutions¶
Option to include built-in and custom substitutions as env variables for all build steps.
- Type
- log_streaming_option¶
Option to define build log streaming behavior to Cloud Storage.
- pool¶
Optional. Specification for execution on a
WorkerPool
.See running builds in a private pool for more information.
- logging¶
Option to specify the logging mode, which determines if and where build logs are stored.
- env¶
A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value.
The elements are of the form “KEY=VALUE” for the environment variable “KEY” being given the value “VALUE”.
- Type
MutableSequence[str]
- secret_env¶
A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build’s
Secret
. These variables will be available to all build steps in this build.- Type
MutableSequence[str]
- volumes¶
Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.
Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Volume]
- default_logs_bucket_behavior¶
Optional. Option to specify how default logs buckets are setup.
- class DefaultLogsBucketBehavior(value)[source]¶
Bases:
proto.enums.Enum
Default Cloud Storage log bucket behavior options.
- Values:
- DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED (0):
Unspecified.
- REGIONAL_USER_OWNED_BUCKET (1):
Bucket is located in user-owned project in the same region as the build. The builder service account must have access to create and write to Cloud Storage buckets in the build project.
- LEGACY_BUCKET (2):
Bucket is located in a Google-owned project and is not regionalized.
- class LogStreamingOption(value)[source]¶
Bases:
proto.enums.Enum
Specifies the behavior when writing build logs to Cloud Storage.
- Values:
- STREAM_DEFAULT (0):
Service may automatically determine build log streaming behavior.
- STREAM_ON (1):
Build logs should be streamed to Cloud Storage.
- STREAM_OFF (2):
Build logs should not be streamed to Cloud Storage; they will be written when the build is completed.
- class LoggingMode(value)[source]¶
Bases:
proto.enums.Enum
Specifies the logging mode.
- Values:
- LOGGING_UNSPECIFIED (0):
The service determines the logging mode. The default is
LEGACY
. Do not rely on the default logging behavior as it may change in the future.- LEGACY (1):
Build logs are stored in Cloud Logging and Cloud Storage.
- GCS_ONLY (2):
Build logs are stored in Cloud Storage.
- STACKDRIVER_ONLY (3):
This option is the same as CLOUD_LOGGING_ONLY.
- CLOUD_LOGGING_ONLY (5):
Build logs are stored in Cloud Logging. Selecting this option will not allow logs streaming.
- NONE (4):
Turn off all logging. No build logs will be captured.
- class MachineType(value)[source]¶
Bases:
proto.enums.Enum
Supported Compute Engine machine types. For more information, see Machine types.
- Values:
- UNSPECIFIED (0):
Standard machine type.
- N1_HIGHCPU_8 (1):
Highcpu machine with 8 CPUs.
- N1_HIGHCPU_32 (2):
Highcpu machine with 32 CPUs.
- E2_HIGHCPU_8 (5):
Highcpu e2 machine with 8 CPUs.
- E2_HIGHCPU_32 (6):
Highcpu e2 machine with 32 CPUs.
- E2_MEDIUM (7):
E2 machine with 1 CPU.
- class PoolOption(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Details about how a build should be executed on a
WorkerPool
.See running builds in a private pool for more information.
- class SubstitutionOption(value)[source]¶
Bases:
proto.enums.Enum
Specifies the behavior when there is an error in the substitution checks.
- Values:
- MUST_MATCH (0):
Fails the build if error in substitutions checks, like missing a substitution in the template or in the map.
- ALLOW_LOOSE (1):
Do not fail the build if error in substitutions checks.
- class VerifyOption(value)[source]¶
Bases:
proto.enums.Enum
Specifies the manner in which the build should be verified, if at all.
If a verified build is requested, and any part of the process to generate and upload provenance fails, the build will also fail.
If the build does not request verification then that process may occur, but is not guaranteed to. If it does occur and fails, the build will not fail.
For more information, see Viewing Build Provenance.
- Values:
- NOT_VERIFIED (0):
Not a verifiable build (the default).
- VERIFIED (1):
Build must be verified.
- class google.cloud.devtools.cloudbuild_v1.types.BuildStep(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A step in the build pipeline.
- name¶
Required. The name of the container image that will run this particular build step.
If the image is available in the host’s Docker daemon’s cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account’s credentials if necessary.
The Docker daemon’s cache will already have the latest versions of all of the officially supported build steps (https://github.com/GoogleCloudPlatform/cloud-builders). The Docker daemon will also have cached many of the layers for some popular images, like “ubuntu”, “debian”, but they will be refreshed at the time you attempt to use them.
If you built an image in a previous build step, it will be stored in the host’s Docker daemon’s cache and is available to use as the name for a later build step.
- Type
- env¶
A list of environment variable definitions to be used when running a step. The elements are of the form “KEY=VALUE” for the environment variable “KEY” being given the value “VALUE”.
- Type
MutableSequence[str]
- args¶
A list of arguments that will be presented to the step when it is started.
If the image used to run the step’s container has an entrypoint, the
args
are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.- Type
MutableSequence[str]
- dir_¶
Working directory to use when running this step’s container.
If this value is a relative path, it is relative to the build’s working directory. If this value is absolute, it may be outside the build’s working directory, in which case the contents of the path may not be persisted across build step executions, unless a
volume
for that path is specified.If the build specifies a
RepoSource
withdir
and a step with adir
, which specifies an absolute path, theRepoSource
dir
is ignored for the step’s execution.- Type
- id¶
Unique identifier for this build step, used in
wait_for
to reference this build step as a dependency.- Type
- wait_for¶
The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in
wait_for
have completed successfully. Ifwait_for
is empty, this build step will start when all previous build steps in theBuild.Steps
list have completed successfully.- Type
MutableSequence[str]
- entrypoint¶
Entrypoint to be used instead of the build step image’s default entrypoint. If unset, the image’s default entrypoint is used.
- Type
- secret_env¶
A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build’s
Secret
.- Type
MutableSequence[str]
- volumes¶
List of volumes to mount into the build step.
Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded.
Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Volume]
- timing¶
Output only. Stores timing information for executing this build step.
- pull_timing¶
Output only. Stores timing information for pulling this build step’s builder image only.
- timeout¶
Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.
- status¶
Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.
- allow_failure¶
Allow this build step to fail without failing the entire build.
If false, the entire build will fail if this step fails. Otherwise, the build will succeed, but this step will still have a failure status. Error information will be reported in the failure_detail field.
- Type
- allow_exit_codes¶
Allow this build step to fail without failing the entire build if and only if the exit code is one of the specified codes. If allow_failure is also specified, this field will take precedence.
- Type
MutableSequence[int]
- script¶
A shell script to be executed in the step.
When script is provided, the user cannot specify the entrypoint or args.
- Type
- class google.cloud.devtools.cloudbuild_v1.types.BuildTrigger(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Configuration for an automated build in response to source repository changes.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- resource_name¶
The
Trigger
name with format:projects/{project}/locations/{location}/triggers/{trigger}
, where {trigger} is a unique identifier generated by the service.- Type
- name¶
User-assigned name of the trigger. Must be unique within the project. Trigger names must meet the following requirements:
They must contain only alphanumeric characters and dashes.
They can be 1-64 characters long.
They must begin and end with an alphanumeric character.
- Type
- trigger_template¶
Template describing the types of source changes to trigger a build.
Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build.
Mutually exclusive with
github
.
- github¶
GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.
Mutually exclusive with
trigger_template
.
- pubsub_config¶
PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.
- webhook_config¶
WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger’s webhook URL.
- autodetect¶
Autodetect build configuration. The following precedence is used (case insensitive):
cloudbuild.yaml
cloudbuild.yml
cloudbuild.json
Dockerfile
Currently only available for GitHub App Triggers.
This field is a member of oneof
build_template
.- Type
- filename¶
Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).
This field is a member of oneof
build_template
.- Type
- git_file_source¶
The file source describing the local or remote Build template.
This field is a member of oneof
build_template
.
- create_time¶
Output only. Time when the trigger was created.
- substitutions¶
Substitutions for Build resource. The keys must match the following regular expression:
^_[A-Z0-9_]+$
.
- ignored_files¶
ignored_files and included_files are file glob matches using https://golang.org/pkg/path/filepath/#Match extended with support for “**”.
If ignored_files and changed files are both empty, then they are not used to determine whether or not to trigger a build.
If ignored_files is not empty, then we ignore any files that match any of the ignored_file globs. If the change has no files that are outside of the ignored_files globs, then we do not trigger a build.
- Type
MutableSequence[str]
- included_files¶
If any of the files altered in the commit pass the ignored_files filter and included_files is empty, then as far as this filter is concerned, we should trigger the build.
If any of the files altered in the commit pass the ignored_files filter and included_files is not empty, then we make sure that at least one of those files matches a included_files glob. If not, then we do not trigger a build.
- Type
MutableSequence[str]
- source_to_build¶
The repo and ref of the repository from which to build. This field is used only for those triggers that do not respond to SCM events. Triggers that respond to such events build source at whatever commit caused the event. This field is currently only used by Webhook, Pub/Sub, Manual, and Cron triggers.
- service_account¶
The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set, then the standard Cloud Build service account ([PROJECT_NUM]@system.gserviceaccount.com) will be used instead. Format:
projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}
- Type
- repository_event_config¶
The configuration of a trigger that creates a build whenever an event from Repo API is received.
- class SubstitutionsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.devtools.cloudbuild_v1.types.BuiltImage(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An image built by the pipeline.
- name¶
Name used to push the container image to Google Container Registry, as presented to
docker push
.- Type
- push_timing¶
Output only. Stores timing information for pushing the specified image.
- class google.cloud.devtools.cloudbuild_v1.types.CancelBuildRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request to cancel an ongoing build.
- name¶
The name of the
Build
to cancel. Format:projects/{project}/locations/{location}/builds/{build}
- Type
- class google.cloud.devtools.cloudbuild_v1.types.CreateBuildRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request to create a new build.
- parent¶
The parent resource where this build will be created. Format:
projects/{project}/locations/{location}
- Type
- build¶
Required. Build resource to create.
- class google.cloud.devtools.cloudbuild_v1.types.CreateBuildTriggerRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request to create a new
BuildTrigger
.- parent¶
The parent resource where this trigger will be created. Format:
projects/{project}/locations/{location}
- Type
- trigger¶
Required.
BuildTrigger
to create.
- class google.cloud.devtools.cloudbuild_v1.types.CreateWorkerPoolOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for the
CreateWorkerPool
operation.- worker_pool¶
The resource name of the
WorkerPool
to create. Format:projects/{project}/locations/{location}/workerPools/{worker_pool}
.- Type
- create_time¶
Time the operation was created.
- complete_time¶
Time the operation was completed.
- class google.cloud.devtools.cloudbuild_v1.types.CreateWorkerPoolRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request to create a new
WorkerPool
.- parent¶
Required. The parent resource where this worker pool will be created. Format:
projects/{project}/locations/{location}
.- Type
- worker_pool¶
Required.
WorkerPool
resource to create.
- worker_pool_id¶
Required. Immutable. The ID to use for the
WorkerPool
, which will become the final component of the resource name.This value should be 1-63 characters, and valid characters are /[a-z][0-9]-/.
- Type
- class google.cloud.devtools.cloudbuild_v1.types.DeleteBuildTriggerRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request to delete a
BuildTrigger
.- name¶
The name of the
Trigger
to delete. Format:projects/{project}/locations/{location}/triggers/{trigger}
- Type
- class google.cloud.devtools.cloudbuild_v1.types.DeleteWorkerPoolOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for the
DeleteWorkerPool
operation.- worker_pool¶
The resource name of the
WorkerPool
being deleted. Format:projects/{project}/locations/{location}/workerPools/{worker_pool}
.- Type
- create_time¶
Time the operation was created.
- complete_time¶
Time the operation was completed.
- class google.cloud.devtools.cloudbuild_v1.types.DeleteWorkerPoolRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request to delete a
WorkerPool
.- name¶
Required. The name of the
WorkerPool
to delete. Format:projects/{project}/locations/{location}/workerPools/{workerPool}
.- Type
- etag¶
Optional. If provided, it must match the server’s etag on the workerpool for the request to be processed.
- Type
- allow_missing¶
If set to true, and the
WorkerPool
is not found, the request will succeed but no action will be taken on the server.- Type
- class google.cloud.devtools.cloudbuild_v1.types.FileHashes(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.
- file_hash¶
Collection of file hashes.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Hash]
- class google.cloud.devtools.cloudbuild_v1.types.GetBuildRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request to get a build.
- name¶
The name of the
Build
to retrieve. Format:projects/{project}/locations/{location}/builds/{build}
- Type
- class google.cloud.devtools.cloudbuild_v1.types.GetBuildTriggerRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Returns the
BuildTrigger
with the specified ID.- name¶
The name of the
Trigger
to retrieve. Format:projects/{project}/locations/{location}/triggers/{trigger}
- Type
- class google.cloud.devtools.cloudbuild_v1.types.GetWorkerPoolRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request to get a
WorkerPool
with the specified name.
- class google.cloud.devtools.cloudbuild_v1.types.GitFileSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
GitFileSource describes a file within a (possibly remote) code repository.
- uri¶
The URI of the repo. Either uri or repository can be specified. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
- Type
- repository¶
The fully qualified resource name of the Repos API repository. Either URI or repository can be specified. If unspecified, the repo from which the trigger invocation originated is assumed to be the repo from which to read the specified path.
This field is a member of oneof
source
.- Type
- repo_type¶
See RepoType above.
- revision¶
The branch, tag, arbitrary ref, or SHA version of the repo to use when resolving the filename (optional). This field respects the same syntax/resolution as described here:
https://git-scm.com/docs/gitrevisions If unspecified, the revision from which the trigger invocation originated is assumed to be the revision from which to read the specified path.
- Type
- github_enterprise_config¶
The full resource name of the github enterprise config. Format:
projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}
.projects/{project}/githubEnterpriseConfigs/{id}
.This field is a member of oneof
enterprise_config
.- Type
- class RepoType(value)[source]¶
Bases:
proto.enums.Enum
The type of the repo, since it may not be explicit from the
repo
field (e.g from a URL).- Values:
- UNKNOWN (0):
The default, unknown repo type. Don’t use it, instead use one of the other repo types.
- CLOUD_SOURCE_REPOSITORIES (1):
A Google Cloud Source Repositories-hosted repo.
- GITHUB (2):
A GitHub-hosted repo not necessarily on “github.com” (i.e. GitHub Enterprise).
- BITBUCKET_SERVER (3):
A Bitbucket Server-hosted repo.
- GITLAB (4):
A GitLab-hosted repo.
- class google.cloud.devtools.cloudbuild_v1.types.GitHubEnterpriseConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
- name¶
Optional. The full resource name for the GitHubEnterpriseConfig For example: “projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}”.
- Type
- app_id¶
Required. The GitHub app id of the Cloud Build app on the GitHub Enterprise server.
- Type
- create_time¶
Output only. Time when the installation was associated with the project.
- webhook_key¶
The key that should be attached to webhook calls to the ReceiveWebhook endpoint.
- Type
- peered_network¶
Optional. The network to be used when reaching out to the GitHub Enterprise server. The VPC network must be enabled for private service connection. This should be set if the GitHub Enterprise server is hosted on-premises and not reachable by public internet. If this field is left empty, no network peering will occur and calls to the GitHub Enterprise server will be made over the public internet. Must be in the format
projects/{project}/global/networks/{network}
, where {project} is a project number or id and {network} is the name of a VPC network in the project.- Type
- secrets¶
Names of secrets in Secret Manager.
- class google.cloud.devtools.cloudbuild_v1.types.GitHubEnterpriseSecrets(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
GitHubEnterpriseSecrets represents the names of all necessary secrets in Secret Manager for a GitHub Enterprise server. Format is: projects/<project number>/secrets/<secret name>.
- webhook_secret_version_name¶
The resource name for the webhook secret secret version in Secret Manager.
- Type
- oauth_secret_version_name¶
The resource name for the OAuth secret secret version in Secret Manager.
- Type
- class google.cloud.devtools.cloudbuild_v1.types.GitHubEventsConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- owner¶
Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is “googlecloudplatform”.
- Type
- name¶
Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is “cloud-builders”.
- Type
- class google.cloud.devtools.cloudbuild_v1.types.GitRepoSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
GitRepoSource describes a repo and ref of a code repository.
- uri¶
The URI of the repo (e.g. https://github.com/user/repo.git). Either
uri
orrepository
can be specified and is required.- Type
- repository¶
The connected repository resource name, in the format
projects/*/locations/*/connections/*/repositories/*
. Eitheruri
orrepository
can be specified and is required.This field is a member of oneof
source
.- Type
- repo_type¶
See RepoType below.
- class google.cloud.devtools.cloudbuild_v1.types.GitSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Location of the source in any accessible Git repository.
- url¶
Location of the Git repo to build.
This will be used as a
git remote
, see https://git-scm.com/docs/git-remote.- Type
- dir_¶
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.- Type
- revision¶
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 forrevision
is parsable by the command. For information on string values accepted bygit fetch
, see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information ongit fetch
, see https://git-scm.com/docs/git-fetch.- Type
- class google.cloud.devtools.cloudbuild_v1.types.Hash(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Container message for hash values.
- type_¶
The type of hash that was performed.
- class HashType(value)[source]¶
Bases:
proto.enums.Enum
Specifies the hash algorithm, if any.
- Values:
- NONE (0):
No hash requested.
- SHA256 (1):
Use a sha256 hash.
- MD5 (2):
Use a md5 hash.
- SHA512 (4):
Use a sha512 hash.
- class google.cloud.devtools.cloudbuild_v1.types.InlineSecret(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Pairs a set of secret environment variables mapped to encrypted values with the Cloud KMS key to use to decrypt the value.
- kms_key_name¶
Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects//locations//keyRings//cryptoKeys/
- Type
- env_map¶
Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build’s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build’s secrets.
- class EnvMapEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.devtools.cloudbuild_v1.types.ListBuildTriggersRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request to list existing
BuildTriggers
.- parent¶
The parent of the collection of
Triggers
. Format:projects/{project}/locations/{location}
- Type
- class google.cloud.devtools.cloudbuild_v1.types.ListBuildTriggersResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response containing existing
BuildTriggers
.- triggers¶
BuildTriggers
for the project, sorted bycreate_time
descending.- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.BuildTrigger]
- class google.cloud.devtools.cloudbuild_v1.types.ListBuildsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request to list builds.
- parent¶
The parent of the collection of
Builds
. Format:projects/{project}/locations/{location}
- Type
- page_token¶
The page token for the next page of Builds.
If unspecified, the first page of results is returned.
If the token is rejected for any reason, INVALID_ARGUMENT will be thrown. In this case, the token should be discarded, and pagination should be restarted from the first page of results.
See https://google.aip.dev/158 for more.
- Type
- class google.cloud.devtools.cloudbuild_v1.types.ListBuildsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response including listed builds.
- builds¶
Builds will be sorted by
create_time
, descending.- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Build]
- class google.cloud.devtools.cloudbuild_v1.types.ListWorkerPoolsRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request to list
WorkerPool
s.- parent¶
Required. The parent of the collection of
WorkerPools
. Format:projects/{project}/locations/{location}
.- Type
- page_size¶
The maximum number of
WorkerPool
s to return. The service may return fewer than this value. If omitted, the server will use a sensible default.- Type
- class google.cloud.devtools.cloudbuild_v1.types.ListWorkerPoolsResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Response containing existing
WorkerPools
.- worker_pools¶
WorkerPools
for the specified project.- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.WorkerPool]
- class google.cloud.devtools.cloudbuild_v1.types.PrivatePoolV1Config(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Configuration for a V1
PrivatePool
.- worker_config¶
Machine configuration for the workers in the pool.
- network_config¶
Network configuration for the pool.
- private_service_connect¶
Immutable. Private Service Connect(PSC) Network configuration for the pool.
- class NetworkConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Defines the network configuration for the pool.
- peered_network¶
Required. Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to
WorkerPool.project_id
on the service producer network. Must be in the formatprojects/{project}/global/networks/{network}
, where{project}
is a project number, such as12345
, and{network}
is the name of a VPC network in the project. See Understanding network configuration options- Type
- egress_option¶
Option to configure network egress for the workers.
- peered_network_ip_range¶
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.- Type
- class EgressOption(value)[source]¶
Bases:
proto.enums.Enum
Defines the egress option for the pool.
- Values:
- EGRESS_OPTION_UNSPECIFIED (0):
If set, defaults to PUBLIC_EGRESS.
- NO_PUBLIC_EGRESS (1):
If set, workers are created without any public address, which prevents network egress to public IPs unless a network proxy is configured.
- PUBLIC_EGRESS (2):
If set, workers are created with a public address which allows for public internet egress.
- class PrivateServiceConnect(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Defines the Private Service Connect network configuration for the pool.
- network_attachment¶
Required. Immutable. The network attachment that the worker network interface is peered to. Must be in the format
projects/{project}/regions/{region}/networkAttachments/{networkAttachment}
. The region of network attachment must be the same as the worker pool. See Network Attachments- Type
- public_ip_address_disabled¶
Required. Immutable. Disable public IP on the primary network interface.
If true, workers are created without any public address, which prevents network egress to public IPs unless a network proxy is configured. If false, workers are created with a public address which allows for public internet egress. The public address only applies to traffic through the primary network interface. If
route_all_traffic
is set to true, all traffic will go through the non-primary network interface, this boolean has no effect.- Type
- route_all_traffic¶
Immutable. Route all traffic through PSC interface. Enable this if you want full control of traffic in the private pool. Configure Cloud NAT for the subnet of network attachment if you need to access public Internet.
If false, Only route private IPs, e.g. 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 through PSC interface.
- Type
- class WorkerConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Defines the configuration to be used for creating workers in the pool.
- machine_type¶
Machine type of a worker, such as
e2-medium
. See Worker pool config file. If left blank, Cloud Build will use a sensible default.- Type
- disk_size_gb¶
Size of the disk attached to the worker, in GB. See Worker pool config file. Specify a value of up to 2000. If
0
is specified, Cloud Build will use a standard disk size.- Type
- class google.cloud.devtools.cloudbuild_v1.types.PubsubConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.
- subscription¶
Output only. Name of the subscription. Format is
projects/{project}/subscriptions/{subscription}
.- Type
- topic¶
The name of the topic from which this subscription is receiving messages. Format is
projects/{project}/topics/{topic}
.- Type
- state¶
Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.
- class State(value)[source]¶
Bases:
proto.enums.Enum
Enumerates potential issues with the underlying Pub/Sub subscription configuration.
- Values:
- STATE_UNSPECIFIED (0):
The subscription configuration has not been checked.
- OK (1):
The Pub/Sub subscription is properly configured.
- SUBSCRIPTION_DELETED (2):
The subscription has been deleted.
- TOPIC_DELETED (3):
The topic has been deleted.
- SUBSCRIPTION_MISCONFIGURED (4):
Some of the subscription’s field are misconfigured.
- class google.cloud.devtools.cloudbuild_v1.types.PullRequestFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
PullRequestFilter contains filter properties for matching GitHub Pull Requests.
- branch¶
Regex of branches to match.
The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
This field is a member of oneof
git_ref
.- Type
- comment_control¶
Configure builds to run whether a repository owner or collaborator need to comment
/gcbrun
.
- class CommentControl(value)[source]¶
Bases:
proto.enums.Enum
Controls behavior of Pull Request comments.
- Values:
- COMMENTS_DISABLED (0):
Do not require comments on Pull Requests before builds are triggered.
- COMMENTS_ENABLED (1):
Enforce that repository owners or collaborators must comment on Pull Requests before builds are triggered.
- COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY (2):
Enforce that repository owners or collaborators must comment on external contributors’ Pull Requests before builds are triggered.
- class google.cloud.devtools.cloudbuild_v1.types.PushFilter(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Push contains filter properties for matching GitHub git pushes.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- branch¶
Regexes matching branches to build.
The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
This field is a member of oneof
git_ref
.- Type
- tag¶
Regexes matching tags to build.
The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
This field is a member of oneof
git_ref
.- Type
- class google.cloud.devtools.cloudbuild_v1.types.ReceiveTriggerWebhookRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
ReceiveTriggerWebhookRequest [Experimental] is the request object accepted by the ReceiveTriggerWebhook method.
- name¶
The name of the
ReceiveTriggerWebhook
to retrieve. Format:projects/{project}/locations/{location}/triggers/{trigger}
- Type
- body¶
HTTP request body.
- Type
google.api.httpbody_pb2.HttpBody
- class google.cloud.devtools.cloudbuild_v1.types.ReceiveTriggerWebhookResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
ReceiveTriggerWebhookResponse [Experimental] is the response object for the ReceiveTriggerWebhook method.
- class google.cloud.devtools.cloudbuild_v1.types.RepoSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Location of the source in a Google Cloud Source Repository.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- project_id¶
ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
- Type
- branch_name¶
Regex matching branches to build.
The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
This field is a member of oneof
revision
.- Type
- tag_name¶
Regex matching tags to build.
The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax
This field is a member of oneof
revision
.- Type
- dir_¶
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.- Type
- invert_regex¶
Only trigger a build if the revision regex does NOT match the revision regex.
- Type
- substitutions¶
Substitutions to use in a triggered build. Should only be used with RunBuildTrigger
- class SubstitutionsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.devtools.cloudbuild_v1.types.RepositoryEventConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
The configuration of a trigger that creates a build whenever an event from Repo API is received.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- repository_type¶
Output only. The type of the SCM vendor the repository points to.
- class RepositoryType(value)[source]¶
Bases:
proto.enums.Enum
All possible SCM repo types from Repo API.
- Values:
- REPOSITORY_TYPE_UNSPECIFIED (0):
If unspecified, RepositoryType defaults to GITHUB.
- GITHUB (1):
The SCM repo is GITHUB.
- GITHUB_ENTERPRISE (2):
The SCM repo is GITHUB Enterprise.
- GITLAB_ENTERPRISE (3):
The SCM repo is GITLAB Enterprise.
- class google.cloud.devtools.cloudbuild_v1.types.Results(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Artifacts created by the build pipeline.
- images¶
Container images that were built as a part of the build.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.BuiltImage]
- build_step_images¶
List of build step digests, in the order corresponding to build step indices.
- Type
MutableSequence[str]
- artifact_manifest¶
Path to the artifact manifest for non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage.
- Type
- num_artifacts¶
Number of non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage.
- Type
- build_step_outputs¶
List of build step outputs, produced by builder images, in the order corresponding to build step indices.
Cloud Builders can produce this output by writing to
$BUILDER_OUTPUT/output
. Only the first 4KB of data is stored.- Type
MutableSequence[bytes]
- artifact_timing¶
Time to push all non-container artifacts to Cloud Storage.
- python_packages¶
Python artifacts uploaded to Artifact Registry at the end of the build.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.UploadedPythonPackage]
- maven_artifacts¶
Maven artifacts uploaded to Artifact Registry at the end of the build.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.UploadedMavenArtifact]
- npm_packages¶
Npm packages uploaded to Artifact Registry at the end of the build.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.UploadedNpmPackage]
- class google.cloud.devtools.cloudbuild_v1.types.RetryBuildRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Specifies a build to retry.
- name¶
The name of the
Build
to retry. Format:projects/{project}/locations/{location}/builds/{build}
- Type
- class google.cloud.devtools.cloudbuild_v1.types.RunBuildTriggerRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Specifies a build trigger to run and the source to use.
- name¶
The name of the
Trigger
to run. Format:projects/{project}/locations/{location}/triggers/{trigger}
- Type
- source¶
Source to build against this trigger. Branch and tag names cannot consist of regular expressions.
- class google.cloud.devtools.cloudbuild_v1.types.Secret(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value. Note: Use
kmsKeyName
withavailable_secrets
instead of usingkmsKeyName
withsecret
. For instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.- secret_env¶
Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build’s secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build’s secrets.
- class SecretEnvEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.devtools.cloudbuild_v1.types.SecretManagerSecret(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Pairs a secret environment variable with a SecretVersion in Secret Manager.
- class google.cloud.devtools.cloudbuild_v1.types.Secrets(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Secrets and secret environment variables.
- secret_manager¶
Secrets in Secret Manager and associated secret environment variable.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.SecretManagerSecret]
- inline¶
Secrets encrypted with KMS key and the associated secret environment variable.
- Type
MutableSequence[google.cloud.devtools.cloudbuild_v1.types.InlineSecret]
- class google.cloud.devtools.cloudbuild_v1.types.Source(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Location of the source in a supported storage service.
This message has oneof fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.
- storage_source¶
If provided, get the source from this location in Cloud Storage.
This field is a member of oneof
source
.
- repo_source¶
If provided, get the source from this location in a Cloud Source Repository.
This field is a member of oneof
source
.
- git_source¶
If provided, get the source from this Git repository.
This field is a member of oneof
source
.
- class google.cloud.devtools.cloudbuild_v1.types.SourceProvenance(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Provenance of the source. Ways to find the original source, or verify that some source was used for this build.
- resolved_storage_source¶
A copy of the build’s
source.storage_source
, if exists, with any generations resolved.
- resolved_repo_source¶
A copy of the build’s
source.repo_source
, if exists, with any revisions resolved.
- resolved_storage_source_manifest¶
A copy of the build’s
source.storage_source_manifest
, if exists, with any revisions resolved. This feature is in Preview.
- file_hashes¶
Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that
FileHashes
will only be populated ifBuildOptions
has requested aSourceProvenanceHash
.The keys to this map are file paths used as build source and the values contain the hash values for those files.
If the build source came in a single package such as a gzipped tarfile (
.tar.gz
), theFileHash
will be for the single path to that file.- Type
MutableMapping[str, google.cloud.devtools.cloudbuild_v1.types.FileHashes]
- class FileHashesEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class google.cloud.devtools.cloudbuild_v1.types.StorageSource(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Location of the source in an archive file in Cloud Storage.
- bucket¶
Cloud Storage bucket containing the source (see Bucket Name Requirements).
- Type
- object_¶
Cloud Storage object containing the source.
This object must be a zipped (
.zip
) or gzipped archive file (.tar.gz
) containing source to build.- Type
- generation¶
Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
- Type
- source_fetcher¶
Option to specify the tool to fetch the source file for the build.
- class SourceFetcher(value)[source]¶
Bases:
proto.enums.Enum
Specifies the tool to fetch the source file for the build.
- Values:
- SOURCE_FETCHER_UNSPECIFIED (0):
Unspecified. Defaults to GSUTIL.
- GSUTIL (1):
Use the “gsutil” tool to download the source file.
- GCS_FETCHER (2):
Use the Cloud Storage Fetcher tool to download the source file.
- class google.cloud.devtools.cloudbuild_v1.types.StorageSourceManifest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Location of the source manifest in Cloud Storage. This feature is in Preview; see description here.
- bucket¶
Cloud Storage bucket containing the source manifest (see Bucket Name Requirements).
- Type
- object_¶
Cloud Storage object containing the source manifest. This object must be a JSON file.
- Type
- class google.cloud.devtools.cloudbuild_v1.types.TimeSpan(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Start and end times for a build execution phase.
- start_time¶
Start of time span.
- end_time¶
End of time span.
- class google.cloud.devtools.cloudbuild_v1.types.UpdateBuildTriggerRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request to update an existing
BuildTrigger
.- trigger¶
Required.
BuildTrigger
to update.
- update_mask¶
Update mask for the resource. If this is set, the server will only update the fields specified in the field mask. Otherwise, a full update of the mutable resource fields will be performed.
- class google.cloud.devtools.cloudbuild_v1.types.UpdateWorkerPoolOperationMetadata(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Metadata for the
UpdateWorkerPool
operation.- worker_pool¶
The resource name of the
WorkerPool
being updated. Format:projects/{project}/locations/{location}/workerPools/{worker_pool}
.- Type
- create_time¶
Time the operation was created.
- complete_time¶
Time the operation was completed.
- class google.cloud.devtools.cloudbuild_v1.types.UpdateWorkerPoolRequest(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Request to update a
WorkerPool
.- worker_pool¶
Required. The
WorkerPool
to update.The
name
field is used to identify theWorkerPool
to update. Format:projects/{project}/locations/{location}/workerPools/{workerPool}
.
- update_mask¶
A mask specifying which fields in
worker_pool
to update.
- class google.cloud.devtools.cloudbuild_v1.types.UploadedMavenArtifact(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
A Maven artifact uploaded using the MavenArtifact directive.
- file_hashes¶
Hash types and values of the Maven Artifact.
- push_timing¶
Output only. Stores timing information for pushing the specified artifact.
- class google.cloud.devtools.cloudbuild_v1.types.UploadedNpmPackage(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
An npm package uploaded to Artifact Registry using the NpmPackage directive.
- file_hashes¶
Hash types and values of the npm package.
- push_timing¶
Output only. Stores timing information for pushing the specified artifact.
- class google.cloud.devtools.cloudbuild_v1.types.UploadedPythonPackage(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Artifact uploaded using the PythonPackage directive.
- file_hashes¶
Hash types and values of the Python Artifact.
- push_timing¶
Output only. Stores timing information for pushing the specified artifact.
- class google.cloud.devtools.cloudbuild_v1.types.Volume(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.
- name¶
Name of the volume to mount.
Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.
- Type
- class google.cloud.devtools.cloudbuild_v1.types.WebhookConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger’s webhook URL.
- secret¶
Required. Resource name for the secret required as a URL parameter.
This field is a member of oneof
auth_method
.- Type
- state¶
Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.
- class State(value)[source]¶
Bases:
proto.enums.Enum
Enumerates potential issues with the Secret Manager secret provided by the user.
- Values:
- STATE_UNSPECIFIED (0):
The webhook auth configuration not been checked.
- OK (1):
The auth configuration is properly setup.
- SECRET_DELETED (2):
The secret provided in auth_method has been deleted.
- class google.cloud.devtools.cloudbuild_v1.types.WorkerPool(mapping=None, *, ignore_unknown_fields=False, **kwargs)[source]¶
Bases:
proto.message.Message
Configuration for a
WorkerPool
.Cloud Build owns and maintains a pool of workers for general use and have no access to a project’s private network. By default, builds submitted to Cloud Build will use a worker from this pool.
If your build needs access to resources on a private network, create and use a
WorkerPool
to run your builds. PrivateWorkerPool
s give your builds access to any single VPC network that you administer, including any on-prem resources connected to that VPC network. For an overview of private pools, see Private pools overview.- name¶
Output only. The resource name of the
WorkerPool
, with formatprojects/{project}/locations/{location}/workerPools/{worker_pool}
. The value of{worker_pool}
is provided byworker_pool_id
inCreateWorkerPool
request and the value of{location}
is determined by the endpoint accessed.- Type
- display_name¶
A user-specified, human-readable name for the
WorkerPool
. If provided, this value must be 1-63 characters.- Type
- annotations¶
User specified annotations. See https://google.aip.dev/128#annotations for more details such as format and size limitations.
- create_time¶
Output only. Time at which the request to create the
WorkerPool
was received.
- update_time¶
Output only. Time at which the request to update the
WorkerPool
was received.
- delete_time¶
Output only. Time at which the request to delete the
WorkerPool
was received.
- state¶
Output only.
WorkerPool
state.
- etag¶
Output only. Checksum computed by the server. May be sent on update and delete requests to ensure that the client has an up-to-date value before proceeding.
- Type
- class AnnotationsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)¶
Bases:
proto.message.Message
- class State(value)[source]¶
Bases:
proto.enums.Enum
State of the
WorkerPool
.- Values:
- STATE_UNSPECIFIED (0):
State of the
WorkerPool
is unknown.- CREATING (1):
WorkerPool
is being created.- RUNNING (2):
WorkerPool
is running.- DELETING (3):
WorkerPool
is being deleted: cancelling builds and draining workers.- DELETED (4):
WorkerPool
is deleted.- UPDATING (5):
WorkerPool
is being updated; new builds cannot be run.