This product is not supported for your selected Datadog site. ().
Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

gcp_cloudbuild_build_trigger

ancestors

Type: UNORDERED_LIST_STRING

approval_config

Type: STRUCT
Provider name: approvalConfig
Description: Configuration for manual approval to start a build invocation of this BuildTrigger.

  • approval_required
    Type: BOOLEAN
    Provider name: approvalRequired
    Description: Whether or not approval is needed. If this is set on a build, it will become pending when created, and will need to be explicitly approved to start.

autodetect

Type: BOOLEAN
Provider name: autodetect
Description: Autodetect build configuration. The following precedence is used (case insensitive): 1. cloudbuild.yaml 2. cloudbuild.yml 3. cloudbuild.json 4. Dockerfile Currently only available for GitHub App Triggers.

bitbucket_server_trigger_config

Type: STRUCT
Provider name: bitbucketServerTriggerConfig
Description: BitbucketServerTriggerConfig describes the configuration of a trigger that creates a build whenever a Bitbucket Server event is received.

  • bitbucket_server_config
    Type: STRUCT
    Provider name: bitbucketServerConfig
    Description: Output only. The BitbucketServerConfig specified in the bitbucket_server_config_resource field.
    • api_key
      Type: STRING
      Provider name: apiKey
      Description: Required. Immutable. API Key that will be attached to webhook. Once this field has been set, it cannot be changed. If you need to change it, please create another BitbucketServerConfig.
    • connected_repositories
      Type: UNORDERED_LIST_STRUCT
      Provider name: connectedRepositories
      Description: Output only. Connected Bitbucket Server repositories for this config.
      • project_key
        Type: STRING
        Provider name: projectKey
        Description: Required. Identifier for the project storing the repository.
      • repo_slug
        Type: STRING
        Provider name: repoSlug
        Description: Required. Identifier for the repository.
      • webhook_id
        Type: INT32
        Provider name: webhookId
        Description: Output only. The ID of the webhook that was created for receiving events from this repo. We only create and manage a single webhook for each repo.
    • create_time
      Type: TIMESTAMP
      Provider name: createTime
      Description: Time when the config was created.
    • host_uri
      Type: STRING
      Provider name: hostUri
      Description: Required. Immutable. The URI of the Bitbucket Server host. Once this field has been set, it cannot be changed. If you need to change it, please create another BitbucketServerConfig.
    • name
      Type: STRING
      Provider name: name
      Description: The resource name for the config.
    • peered_network
      Type: STRING
      Provider name: peeredNetwork
      Description: Optional. The network to be used when reaching out to the Bitbucket Server instance. The VPC network must be enabled for private service connection. This should be set if the Bitbucket Server instance 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 Bitbucket Server instance 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.
    • peered_network_ip_range
      Type: STRING
      Provider name: peeredNetworkIpRange
      Description: Immutable. 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 29 bit prefix size. /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. The field only has an effect if peered_network is set.
    • secrets
      Type: STRUCT
      Provider name: secrets
      Description: Required. Secret Manager secrets needed by the config.
      • admin_access_token_version_name
        Type: STRING
        Provider name: adminAccessTokenVersionName
        Description: Required. The resource name for the admin access token’s secret version.
      • read_access_token_version_name
        Type: STRING
        Provider name: readAccessTokenVersionName
        Description: Required. The resource name for the read access token’s secret version.
      • webhook_secret_version_name
        Type: STRING
        Provider name: webhookSecretVersionName
        Description: Required. Immutable. The resource name for the webhook secret’s secret version. Once this field has been set, it cannot be changed. If you need to change it, please create another BitbucketServerConfig.
    • ssl_ca
      Type: STRING
      Provider name: sslCa
      Description: Optional. SSL certificate to use for requests to Bitbucket Server. The format should be PEM format but the extension can be one of .pem, .cer, or .crt.
    • username
      Type: STRING
      Provider name: username
      Description: Username of the account Cloud Build will use on Bitbucket Server.
    • webhook_key
      Type: STRING
      Provider name: webhookKey
      Description: Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
  • bitbucket_server_config_resource
    Type: STRING
    Provider name: bitbucketServerConfigResource
    Description: Required. The Bitbucket server config resource that this trigger config maps to.
  • project_key
    Type: STRING
    Provider name: projectKey
    Description: Required. Key of the project that the repo is in. For example: The key for https://mybitbucket.server/projects/TEST/repos/test-repo is “TEST”.
  • pull_request
    Type: STRUCT
    Provider name: pullRequest
    Description: Filter to match changes in pull requests.
    • branch
      Type: STRING
      Provider name: branch
      Description: 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
    • comment_control
      Type: STRING
      Provider name: commentControl
      Description: If CommentControl is enabled, depending on the setting, builds may not fire until a repository writer comments /gcbrun on a pull request or /gcbrun is in the pull request description. Only PR comments that contain /gcbrun will trigger builds. If CommentControl is set to disabled, comments with /gcbrun from a user with repository write permission or above will still trigger builds to run.
      Possible values:
      • COMMENTS_DISABLED - Do not require /gcbrun comments from a user with repository write permission or above on pull requests before builds are triggered. Comments that contain /gcbrun will still fire builds so this should be thought of as comments not required.
      • COMMENTS_ENABLED - Builds will only fire in response to pull requests if: 1. The pull request author has repository write permission or above and /gcbrun is in the PR description. 2. A user with repository writer permissions or above comments /gcbrun on a pull request authored by any user.
      • COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY - Builds will only fire in response to pull requests if: 1. The pull request author is a repository writer or above. 2. If the author does not have write permissions, a user with write permissions or above must comment /gcbrun in order to fire a build.
    • invert_regex
      Type: BOOLEAN
      Provider name: invertRegex
      Description: If true, branches that do NOT match the git_ref will trigger a build.
  • push
    Type: STRUCT
    Provider name: push
    Description: Filter to match changes in refs like branches, tags.
    • branch
      Type: STRING
      Provider name: branch
      Description: 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
    • invert_regex
      Type: BOOLEAN
      Provider name: invertRegex
      Description: When true, only trigger a build if the revision regex does NOT match the git_ref regex.
    • tag
      Type: STRING
      Provider name: tag
      Description: 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
  • repo_slug
    Type: STRING
    Provider name: repoSlug
    Description: Required. Slug of the repository. A repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket for use in the URL. For example, if the repository name is ’test repo’, in the URL it would become ’test-repo’ as in https://mybitbucket.server/projects/TEST/repos/test-repo.

build

Type: STRUCT
Provider name: build
Description: Contents of the build template.

  • approval
    Type: STRUCT
    Provider name: approval
    Description: Output only. Describes this build’s approval configuration, status, and result.
    • config
      Type: STRUCT
      Provider name: config
      Description: Output only. Configuration for manual approval of this build.
      • approval_required
        Type: BOOLEAN
        Provider name: approvalRequired
        Description: Whether or not approval is needed. If this is set on a build, it will become pending when created, and will need to be explicitly approved to start.
    • result
      Type: STRUCT
      Provider name: result
      Description: Output only. Result of manual approval for this Build.
      • approval_time
        Type: TIMESTAMP
        Provider name: approvalTime
        Description: Output only. The time when the approval decision was made.
      • approver_account
        Type: STRING
        Provider name: approverAccount
        Description: 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.
      • comment
        Type: STRING
        Provider name: comment
        Description: Optional. An optional comment for this manual approval result.
      • decision
        Type: STRING
        Provider name: decision
        Description: Required. The decision of this manual approval.
        Possible values:
        • DECISION_UNSPECIFIED - Default enum type. This should not be used.
        • APPROVED - Build is approved.
        • REJECTED - Build is rejected.
      • url
        Type: STRING
        Provider name: url
        Description: 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.
    • state
      Type: STRING
      Provider name: state
      Description: Output only. The state of this build’s approval.
      Possible values:
      • STATE_UNSPECIFIED - Default enum type. This should not be used.
      • PENDING - Build approval is pending.
      • APPROVED - Build approval has been approved.
      • REJECTED - Build approval has been rejected.
      • CANCELLED - Build was cancelled while it was still pending approval.
  • artifacts
    Type: STRUCT
    Provider name: artifacts
    Description: Artifacts produced by the build that should be uploaded upon successful completion of all build steps.
    • go_modules
      Type: UNORDERED_LIST_STRUCT
      Provider name: goModules
      Description: Optional. A list of Go modules to be uploaded to Artifact Registry upon successful completion of all build steps. If any objects fail to be pushed, the build is marked FAILURE.
      • module_path
        Type: STRING
        Provider name: modulePath
        Description: Optional. The Go module’s “module path”. e.g. example.com/foo/v2
      • module_version
        Type: STRING
        Provider name: moduleVersion
        Description: Optional. The Go module’s semantic version in the form vX.Y.Z. e.g. v0.1.1 Pre-release identifiers can also be added by appending a dash and dot separated ASCII alphanumeric characters and hyphens. e.g. v0.2.3-alpha.x.12m.5
      • repository_location
        Type: STRING
        Provider name: repositoryLocation
        Description: Optional. Location of the Artifact Registry repository. i.e. us-east1 Defaults to the build’s location.
      • repository_name
        Type: STRING
        Provider name: repositoryName
        Description: Optional. Artifact Registry repository name. Specified Go modules will be zipped and uploaded to Artifact Registry with this location as a prefix. e.g. my-go-repo
      • repository_project_id
        Type: STRING
        Provider name: repositoryProjectId
        Description: Optional. Project ID of the Artifact Registry repository. Defaults to the build project.
      • source_path
        Type: STRING
        Provider name: sourcePath
        Description: Optional. Source path of the go.mod file in the build’s workspace. If not specified, this will default to the current directory. e.g. ~/code/go/mypackage
    • images
      Type: UNORDERED_LIST_STRING
      Provider name: images
      Description: 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.
    • maven_artifacts
      Type: UNORDERED_LIST_STRUCT
      Provider name: mavenArtifacts
      Description: 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.
      • artifact_id
        Type: STRING
        Provider name: artifactId
        Description: Maven artifactId value used when uploading the artifact to Artifact Registry.
      • group_id
        Type: STRING
        Provider name: groupId
        Description: Maven groupId value used when uploading the artifact to Artifact Registry.
      • path
        Type: STRING
        Provider name: path
        Description: 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.
      • repository
        Type: STRING
        Provider name: repository
        Description: 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.
      • version
        Type: STRING
        Provider name: version
        Description: Maven version value used when uploading the artifact to Artifact Registry.
    • npm_packages
      Type: UNORDERED_LIST_STRUCT
      Provider name: npmPackages
      Description: 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.
      • package_path
        Type: STRING
        Provider name: packagePath
        Description: Path to the package.json. e.g. workspace/path/to/package
      • repository
        Type: STRING
        Provider name: repository
        Description: 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.
    • objects
      Type: STRUCT
      Provider name: objects
      Description: 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.
      • location
        Type: STRING
        Provider name: location
        Description: 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.
      • paths
        Type: UNORDERED_LIST_STRING
        Provider name: paths
        Description: Path globs used to match files in the build’s workspace.
      • timing
        Type: STRUCT
        Provider name: timing
        Description: Output only. Stores timing information for pushing all artifact objects.
        • end_time
          Type: TIMESTAMP
          Provider name: endTime
          Description: End of time span.
        • start_time
          Type: TIMESTAMP
          Provider name: startTime
          Description: Start of time span.
    • python_packages
      Type: UNORDERED_LIST_STRUCT
      Provider name: pythonPackages
      Description: 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.
      • paths
        Type: UNORDERED_LIST_STRING
        Provider name: paths
        Description: Path globs used to match files in the build’s workspace. For Python/ Twine, this is usually dist/*, and sometimes additionally an .asc file.
      • repository
        Type: STRING
        Provider name: repository
        Description: 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.
  • available_secrets
    Type: STRUCT
    Provider name: availableSecrets
    Description: Secrets and secret environment variables.
    • inline
      Type: UNORDERED_LIST_STRUCT
      Provider name: inline
      Description: Secrets encrypted with KMS key and the associated secret environment variable.
      • kms_key_name
        Type: STRING
        Provider name: kmsKeyName
        Description: Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects//locations//keyRings//cryptoKeys/
    • secret_manager
      Type: UNORDERED_LIST_STRUCT
      Provider name: secretManager
      Description: Secrets in Secret Manager and associated secret environment variable.
      • env
        Type: STRING
        Provider name: env
        Description: Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build’s secrets, and must be used by at least one build step.
      • version_name
        Type: STRING
        Provider name: versionName
        Description: Resource name of the SecretVersion. In format: projects//secrets//versions/*
  • build_trigger_id
    Type: STRING
    Provider name: buildTriggerId
    Description: Output only. The ID of the BuildTrigger that triggered this build, if it was triggered automatically.
  • create_time
    Type: TIMESTAMP
    Provider name: createTime
    Description: Output only. Time at which the request to create the build was received.
  • dependencies
    Type: UNORDERED_LIST_STRUCT
    Provider name: dependencies
    Description: Optional. Dependencies that the Cloud Build worker will fetch before executing user steps.
    • empty
      Type: BOOLEAN
      Provider name: empty
      Description: If set to true disable all dependency fetching (ignoring the default source as well).
    • git_source
      Type: STRUCT
      Provider name: gitSource
      Description: Represents a git repository as a build dependency.
      • depth
        Type: INT64
        Provider name: depth
        Description: Optional. How much history should be fetched for the build (default 1, -1 for all history).
      • dest_path
        Type: STRING
        Provider name: destPath
        Description: Required. Where should the files be placed on the worker.
      • recurse_submodules
        Type: BOOLEAN
        Provider name: recurseSubmodules
        Description: Optional. True if submodules should be fetched too (default false).
      • repository
        Type: STRUCT
        Provider name: repository
        Description: Required. The kind of repo (url or dev connect).
        • developer_connect
          Type: STRING
          Provider name: developerConnect
          Description: The Developer Connect Git repository link or the url that matches a repository link in the current project, formatted as projects/*/locations/*/connections/*/gitRepositoryLink/*
        • url
          Type: STRING
          Provider name: url
          Description: Location of the Git repository.
      • revision
        Type: STRING
        Provider name: revision
        Description: Required. The revision that we will fetch the repo at.
  • failure_info
    Type: STRUCT
    Provider name: failureInfo
    Description: Output only. Contains information about the build when status=FAILURE.
    • detail
      Type: STRING
      Provider name: detail
      Description: Explains the failure issue in more detail using hard-coded text.
    • type
      Type: STRING
      Provider name: type
      Description: The name of the failure.
      Possible values:
      • FAILURE_TYPE_UNSPECIFIED - Type unspecified
      • PUSH_FAILED - Unable to push the image to the repository.
      • PUSH_IMAGE_NOT_FOUND - Final image not found.
      • PUSH_NOT_AUTHORIZED - Unauthorized push of the final image.
      • LOGGING_FAILURE - Backend logging failures. Should retry.
      • USER_BUILD_STEP - A build step has failed.
      • FETCH_SOURCE_FAILED - The source fetching has failed.
  • finish_time
    Type: TIMESTAMP
    Provider name: finishTime
    Description: 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.
  • gcp_source
    Type: STRUCT
    Provider name: source
    Description: Optional. The location of the source files to build.
    • connected_repository
      Type: STRUCT
      Provider name: connectedRepository
      Description: Optional. If provided, get the source from this 2nd-gen Google Cloud Build repository resource.
      • dir
        Type: STRING
        Provider name: dir
        Description: Optional. Directory, relative to the source root, in which to run the build.
      • repository
        Type: STRING
        Provider name: repository
        Description: Required. Name of the Google Cloud Build repository, formatted as projects/*/locations/*/connections/*/repositories/*.
      • revision
        Type: STRING
        Provider name: revision
        Description: Required. The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref.
    • developer_connect_config
      Type: STRUCT
      Provider name: developerConnectConfig
      Description: If provided, get the source from this Developer Connect config.
      • dir
        Type: STRING
        Provider name: dir
        Description: Required. Directory, relative to the source root, in which to run the build.
      • git_repository_link
        Type: STRING
        Provider name: gitRepositoryLink
        Description: Required. The Developer Connect Git repository link, formatted as projects/*/locations/*/connections/*/gitRepositoryLink/*.
      • revision
        Type: STRING
        Provider name: revision
        Description: Required. The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref.
    • git_source
      Type: STRUCT
      Provider name: gitSource
      Description: If provided, get the source from this Git repository.
      • dir
        Type: STRING
        Provider name: dir
        Description: Optional. 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.
      • revision
        Type: STRING
        Provider name: revision
        Description: Optional. 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.
      • url
        Type: STRING
        Provider name: url
        Description: Required. Location of the Git repo to build. This will be used as a git remote, see https://git-scm.com/docs/git-remote.
    • repo_source
      Type: STRUCT
      Provider name: repoSource
      Description: If provided, get the source from this location in a Cloud Source Repository.
      • branch_name
        Type: STRING
        Provider name: branchName
        Description: 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
      • commit_sha
        Type: STRING
        Provider name: commitSha
        Description: Explicit commit SHA to build.
      • dir
        Type: STRING
        Provider name: dir
        Description: Optional. 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.
      • invert_regex
        Type: BOOLEAN
        Provider name: invertRegex
        Description: Optional. Only trigger a build if the revision regex does NOT match the revision regex.
      • project_id
        Type: STRING
        Provider name: projectId
        Description: Optional. ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
      • repo_name
        Type: STRING
        Provider name: repoName
        Description: Required. Name of the Cloud Source Repository.
      • tag_name
        Type: STRING
        Provider name: tagName
        Description: 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
    • storage_source
      Type: STRUCT
      Provider name: storageSource
      Description: If provided, get the source from this location in Cloud Storage.
      • bucket
        Type: STRING
        Provider name: bucket
        Description: Cloud Storage bucket containing the source (see Bucket Name Requirements).
      • generation
        Type: STRING
        Provider name: generation
        Description: Optional. Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
      • object
        Type: STRING
        Provider name: object
        Description: Required. Cloud Storage object containing the source. This object must be a zipped (.zip) or gzipped archive file (.tar.gz) containing source to build.
      • source_fetcher
        Type: STRING
        Provider name: sourceFetcher
        Description: Optional. Option to specify the tool to fetch the source file for the build.
        Possible values:
        • SOURCE_FETCHER_UNSPECIFIED - Unspecified defaults to GSUTIL.
        • GSUTIL - Use the ‘gsutil’ tool to download the source file.
        • GCS_FETCHER - Use the Cloud Storage Fetcher tool to download the source file.
    • storage_source_manifest
      Type: STRUCT
      Provider name: storageSourceManifest
      Description: If provided, get the source from this manifest in Cloud Storage. This feature is in Preview; see description here.
      • bucket
        Type: STRING
        Provider name: bucket
        Description: Required. Cloud Storage bucket containing the source manifest (see Bucket Name Requirements).
      • generation
        Type: STRING
        Provider name: generation
        Description: Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
      • object
        Type: STRING
        Provider name: object
        Description: Required. Cloud Storage object containing the source manifest. This object must be a JSON file.
  • gcp_status
    Type: STRING
    Provider name: status
    Description: Output only. Status of the build.
    Possible values:
    • STATUS_UNKNOWN - Status of the build is unknown.
    • PENDING - Build has been created and is pending execution and queuing. It has not been queued.
    • QUEUED - Build or step is queued; work has not yet begun.
    • WORKING - Build or step is being executed.
    • SUCCESS - Build or step finished successfully.
    • FAILURE - Build or step failed to complete successfully.
    • INTERNAL_ERROR - Build or step failed due to an internal cause.
    • TIMEOUT - Build or step took longer than was allowed.
    • CANCELLED - Build or step was canceled by a user.
    • EXPIRED - Build was enqueued for longer than the value of queue_ttl.
  • git_config
    Type: STRUCT
    Provider name: gitConfig
    Description: Optional. Configuration for git operations.
    • http
      Type: STRUCT
      Provider name: http
      Description: Configuration for HTTP related git operations.
      • proxy_secret_version_name
        Type: STRING
        Provider name: proxySecretVersionName
        Description: SecretVersion resource of the HTTP proxy URL. The Service Account used in the build (either the default Service Account or user-specified Service Account) should have secretmanager.versions.access permissions on this secret. The proxy URL should be in format protocol://@]proxyhost[:port].
  • id
    Type: STRING
    Provider name: id
    Description: Output only. Unique identifier of the build.
  • images
    Type: UNORDERED_LIST_STRING
    Provider name: images
    Description: 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.
  • log_url
    Type: STRING
    Provider name: logUrl
    Description: Output only. URL to logs for this build in Google Cloud Console.
  • logs_bucket
    Type: STRING
    Provider name: logsBucket
    Description: 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.
  • name
    Type: STRING
    Provider name: name
    Description: Output only. The ‘Build’ name with format: projects/{project}/locations/{location}/builds/{build}, where {build} is a unique identifier generated by the service.
  • options
    Type: STRUCT
    Provider name: options
    Description: Special options for this build.
    • automap_substitutions
      Type: BOOLEAN
      Provider name: automapSubstitutions
      Description: Option to include built-in and custom substitutions as env variables for all build steps.
    • default_logs_bucket_behavior
      Type: STRING
      Provider name: defaultLogsBucketBehavior
      Description: Optional. Option to specify how default logs buckets are setup.
      Possible values:
      • DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED - Unspecified.
      • REGIONAL_USER_OWNED_BUCKET - 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 - Bucket is located in a Google-owned project and is not regionalized.
    • disk_size_gb
      Type: INT64
      Provider name: diskSizeGb
      Description: 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 4000GB; builds that request more than the maximum are rejected with an error.
    • dynamic_substitutions
      Type: BOOLEAN
      Provider name: dynamicSubstitutions
      Description: 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.
    • enable_structured_logging
      Type: BOOLEAN
      Provider name: enableStructuredLogging
      Description: Optional. Option to specify whether structured logging is enabled. If true, JSON-formatted logs are parsed as structured logs.
    • env
      Type: UNORDERED_LIST_STRING
      Provider name: env
      Description: 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”.
    • log_streaming_option
      Type: STRING
      Provider name: logStreamingOption
      Description: Option to define build log streaming behavior to Cloud Storage.
      Possible values:
      • STREAM_DEFAULT - Service may automatically determine build log streaming behavior.
      • STREAM_ON - Build logs should be streamed to Cloud Storage.
      • STREAM_OFF - Build logs should not be streamed to Cloud Storage; they will be written when the build is completed.
    • logging
      Type: STRING
      Provider name: logging
      Description: Option to specify the logging mode, which determines if and where build logs are stored.
      Possible values:
      • LOGGING_UNSPECIFIED - 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 - Build logs are stored in Cloud Logging and Cloud Storage.
      • GCS_ONLY - Build logs are stored in Cloud Storage.
      • STACKDRIVER_ONLY - This option is the same as CLOUD_LOGGING_ONLY.
      • CLOUD_LOGGING_ONLY - Build logs are stored in Cloud Logging. Selecting this option will not allow logs streaming.
      • NONE - Turn off all logging. No build logs will be captured.
    • machine_type
      Type: STRING
      Provider name: machineType
      Description: Compute Engine machine type on which to run the build.
      Possible values:
      • UNSPECIFIED - Standard machine type.
      • N1_HIGHCPU_8 - Highcpu machine with 8 CPUs.
      • N1_HIGHCPU_32 - Highcpu machine with 32 CPUs.
      • E2_HIGHCPU_8 - Highcpu e2 machine with 8 CPUs.
      • E2_HIGHCPU_32 - Highcpu e2 machine with 32 CPUs.
      • E2_MEDIUM - E2 machine with 1 CPU.
    • pool
      Type: STRUCT
      Provider name: pool
      Description: Optional. Specification for execution on a WorkerPool. See running builds in a private pool for more information.
      • name
        Type: STRING
        Provider name: name
        Description: The WorkerPool resource to execute the build on. You must have cloudbuild.workerpools.use on the project hosting the WorkerPool. Format projects/{project}/locations/{location}/workerPools/{workerPoolId}
    • pubsub_topic
      Type: STRING
      Provider name: pubsubTopic
      Description: Optional. Option to specify the Pub/Sub topic to receive build status updates.
    • requested_verify_option
      Type: STRING
      Provider name: requestedVerifyOption
      Description: Requested verifiability options.
      Possible values:
      • NOT_VERIFIED - Not a verifiable build (the default).
      • VERIFIED - Build must be verified.
    • secret_env
      Type: UNORDERED_LIST_STRING
      Provider name: secretEnv
      Description: 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.
    • source_provenance_hash
      Type: UNORDERED_LIST_STRING
      Provider name: sourceProvenanceHash
      Description: Requested hash for SourceProvenance.
    • substitution_option
      Type: STRING
      Provider name: substitutionOption
      Description: 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.
      Possible values:
      • MUST_MATCH - Fails the build if error in substitutions checks, like missing a substitution in the template or in the map.
      • ALLOW_LOOSE - Do not fail the build if error in substitutions checks.
    • volumes
      Type: UNORDERED_LIST_STRUCT
      Provider name: volumes
      Description: 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.
      • name
        Type: STRING
        Provider name: name
        Description: 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.
      • path
        Type: STRING
        Provider name: path
        Description: Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
    • worker_pool
      Type: STRING
      Provider name: workerPool
      Description: This field deprecated; please use pool.name instead.
  • project_id
    Type: STRING
    Provider name: projectId
    Description: Output only. ID of the project.
  • queue_ttl
    Type: STRING
    Provider name: queueTtl
    Description: 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.
  • results
    Type: STRUCT
    Provider name: results
    Description: Output only. Results of the build.
    • artifact_manifest
      Type: STRING
      Provider name: artifactManifest
      Description: Path to the artifact manifest for non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage.
    • artifact_timing
      Type: STRUCT
      Provider name: artifactTiming
      Description: Time to push all non-container artifacts to Cloud Storage.
      • end_time
        Type: TIMESTAMP
        Provider name: endTime
        Description: End of time span.
      • start_time
        Type: TIMESTAMP
        Provider name: startTime
        Description: Start of time span.
    • build_step_images
      Type: UNORDERED_LIST_STRING
      Provider name: buildStepImages
      Description: List of build step digests, in the order corresponding to build step indices.
    • go_modules
      Type: UNORDERED_LIST_STRUCT
      Provider name: goModules
      Description: Optional. Go module artifacts uploaded to Artifact Registry at the end of the build.
      • file_hashes
        Type: STRUCT
        Provider name: fileHashes
        Description: Hash types and values of the Go Module Artifact.
        • file_hash
          Type: UNORDERED_LIST_STRUCT
          Provider name: fileHash
          Description: Collection of file hashes.
          • type
            Type: STRING
            Provider name: type
            Description: The type of hash that was performed.
            Possible values:
            • NONE - No hash requested.
            • SHA256 - Use a sha256 hash.
            • MD5 - Use a md5 hash.
            • GO_MODULE_H1 - Dirhash of a Go module’s source code which is then hex-encoded.
            • SHA512 - Use a sha512 hash.
      • push_timing
        Type: STRUCT
        Provider name: pushTiming
        Description: Output only. Stores timing information for pushing the specified artifact.
        • end_time
          Type: TIMESTAMP
          Provider name: endTime
          Description: End of time span.
        • start_time
          Type: TIMESTAMP
          Provider name: startTime
          Description: Start of time span.
      • uri
        Type: STRING
        Provider name: uri
        Description: URI of the uploaded artifact.
    • images
      Type: UNORDERED_LIST_STRUCT
      Provider name: images
      Description: Container images that were built as a part of the build.
      • digest
        Type: STRING
        Provider name: digest
        Description: Docker Registry 2.0 digest.
      • name
        Type: STRING
        Provider name: name
        Description: Name used to push the container image to Google Container Registry, as presented to docker push.
      • push_timing
        Type: STRUCT
        Provider name: pushTiming
        Description: Output only. Stores timing information for pushing the specified image.
        • end_time
          Type: TIMESTAMP
          Provider name: endTime
          Description: End of time span.
        • start_time
          Type: TIMESTAMP
          Provider name: startTime
          Description: Start of time span.
    • maven_artifacts
      Type: UNORDERED_LIST_STRUCT
      Provider name: mavenArtifacts
      Description: Maven artifacts uploaded to Artifact Registry at the end of the build.
      • file_hashes
        Type: STRUCT
        Provider name: fileHashes
        Description: Hash types and values of the Maven Artifact.
        • file_hash
          Type: UNORDERED_LIST_STRUCT
          Provider name: fileHash
          Description: Collection of file hashes.
          • type
            Type: STRING
            Provider name: type
            Description: The type of hash that was performed.
            Possible values:
            • NONE - No hash requested.
            • SHA256 - Use a sha256 hash.
            • MD5 - Use a md5 hash.
            • GO_MODULE_H1 - Dirhash of a Go module’s source code which is then hex-encoded.
            • SHA512 - Use a sha512 hash.
      • push_timing
        Type: STRUCT
        Provider name: pushTiming
        Description: Output only. Stores timing information for pushing the specified artifact.
        • end_time
          Type: TIMESTAMP
          Provider name: endTime
          Description: End of time span.
        • start_time
          Type: TIMESTAMP
          Provider name: startTime
          Description: Start of time span.
      • uri
        Type: STRING
        Provider name: uri
        Description: URI of the uploaded artifact.
    • npm_packages
      Type: UNORDERED_LIST_STRUCT
      Provider name: npmPackages
      Description: Npm packages uploaded to Artifact Registry at the end of the build.
      • file_hashes
        Type: STRUCT
        Provider name: fileHashes
        Description: Hash types and values of the npm package.
        • file_hash
          Type: UNORDERED_LIST_STRUCT
          Provider name: fileHash
          Description: Collection of file hashes.
          • type
            Type: STRING
            Provider name: type
            Description: The type of hash that was performed.
            Possible values:
            • NONE - No hash requested.
            • SHA256 - Use a sha256 hash.
            • MD5 - Use a md5 hash.
            • GO_MODULE_H1 - Dirhash of a Go module’s source code which is then hex-encoded.
            • SHA512 - Use a sha512 hash.
      • push_timing
        Type: STRUCT
        Provider name: pushTiming
        Description: Output only. Stores timing information for pushing the specified artifact.
        • end_time
          Type: TIMESTAMP
          Provider name: endTime
          Description: End of time span.
        • start_time
          Type: TIMESTAMP
          Provider name: startTime
          Description: Start of time span.
      • uri
        Type: STRING
        Provider name: uri
        Description: URI of the uploaded npm package.
    • num_artifacts
      Type: INT64
      Provider name: numArtifacts
      Description: Number of non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage.
    • python_packages
      Type: UNORDERED_LIST_STRUCT
      Provider name: pythonPackages
      Description: Python artifacts uploaded to Artifact Registry at the end of the build.
      • file_hashes
        Type: STRUCT
        Provider name: fileHashes
        Description: Hash types and values of the Python Artifact.
        • file_hash
          Type: UNORDERED_LIST_STRUCT
          Provider name: fileHash
          Description: Collection of file hashes.
          • type
            Type: STRING
            Provider name: type
            Description: The type of hash that was performed.
            Possible values:
            • NONE - No hash requested.
            • SHA256 - Use a sha256 hash.
            • MD5 - Use a md5 hash.
            • GO_MODULE_H1 - Dirhash of a Go module’s source code which is then hex-encoded.
            • SHA512 - Use a sha512 hash.
      • push_timing
        Type: STRUCT
        Provider name: pushTiming
        Description: Output only. Stores timing information for pushing the specified artifact.
        • end_time
          Type: TIMESTAMP
          Provider name: endTime
          Description: End of time span.
        • start_time
          Type: TIMESTAMP
          Provider name: startTime
          Description: Start of time span.
      • uri
        Type: STRING
        Provider name: uri
        Description: URI of the uploaded artifact.
  • secrets
    Type: UNORDERED_LIST_STRUCT
    Provider name: secrets
    Description: 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
    • kms_key_name
      Type: STRING
      Provider name: kmsKeyName
      Description: Cloud KMS key name to use to decrypt these envs.
  • service_account
    Type: STRING
    Provider name: serviceAccount
    Description: 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.
  • source_provenance
    Type: STRUCT
    Provider name: sourceProvenance
    Description: Output only. A permanent fixed identifier for source.
    • resolved_connected_repository
      Type: STRUCT
      Provider name: resolvedConnectedRepository
      Description: Output only. A copy of the build’s source.connected_repository, if exists, with any revisions resolved.
      • dir
        Type: STRING
        Provider name: dir
        Description: Optional. Directory, relative to the source root, in which to run the build.
      • repository
        Type: STRING
        Provider name: repository
        Description: Required. Name of the Google Cloud Build repository, formatted as projects/*/locations/*/connections/*/repositories/*.
      • revision
        Type: STRING
        Provider name: revision
        Description: Required. The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref.
    • resolved_git_source
      Type: STRUCT
      Provider name: resolvedGitSource
      Description: Output only. A copy of the build’s source.git_source, if exists, with any revisions resolved.
      • dir
        Type: STRING
        Provider name: dir
        Description: Optional. 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.
      • revision
        Type: STRING
        Provider name: revision
        Description: Optional. 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.
      • url
        Type: STRING
        Provider name: url
        Description: Required. Location of the Git repo to build. This will be used as a git remote, see https://git-scm.com/docs/git-remote.
    • resolved_repo_source
      Type: STRUCT
      Provider name: resolvedRepoSource
      Description: A copy of the build’s source.repo_source, if exists, with any revisions resolved.
      • branch_name
        Type: STRING
        Provider name: branchName
        Description: 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
      • commit_sha
        Type: STRING
        Provider name: commitSha
        Description: Explicit commit SHA to build.
      • dir
        Type: STRING
        Provider name: dir
        Description: Optional. 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.
      • invert_regex
        Type: BOOLEAN
        Provider name: invertRegex
        Description: Optional. Only trigger a build if the revision regex does NOT match the revision regex.
      • project_id
        Type: STRING
        Provider name: projectId
        Description: Optional. ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
      • repo_name
        Type: STRING
        Provider name: repoName
        Description: Required. Name of the Cloud Source Repository.
      • tag_name
        Type: STRING
        Provider name: tagName
        Description: 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
    • resolved_storage_source
      Type: STRUCT
      Provider name: resolvedStorageSource
      Description: A copy of the build’s source.storage_source, if exists, with any generations resolved.
      • bucket
        Type: STRING
        Provider name: bucket
        Description: Cloud Storage bucket containing the source (see Bucket Name Requirements).
      • generation
        Type: STRING
        Provider name: generation
        Description: Optional. Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
      • object
        Type: STRING
        Provider name: object
        Description: Required. Cloud Storage object containing the source. This object must be a zipped (.zip) or gzipped archive file (.tar.gz) containing source to build.
      • source_fetcher
        Type: STRING
        Provider name: sourceFetcher
        Description: Optional. Option to specify the tool to fetch the source file for the build.
        Possible values:
        • SOURCE_FETCHER_UNSPECIFIED - Unspecified defaults to GSUTIL.
        • GSUTIL - Use the ‘gsutil’ tool to download the source file.
        • GCS_FETCHER - Use the Cloud Storage Fetcher tool to download the source file.
    • resolved_storage_source_manifest
      Type: STRUCT
      Provider name: resolvedStorageSourceManifest
      Description: A copy of the build’s source.storage_source_manifest, if exists, with any revisions resolved. This feature is in Preview.
      • bucket
        Type: STRING
        Provider name: bucket
        Description: Required. Cloud Storage bucket containing the source manifest (see Bucket Name Requirements).
      • generation
        Type: STRING
        Provider name: generation
        Description: Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.
      • object
        Type: STRING
        Provider name: object
        Description: Required. Cloud Storage object containing the source manifest. This object must be a JSON file.
  • start_time
    Type: TIMESTAMP
    Provider name: startTime
    Description: Output only. Time at which execution of the build was started.
  • status_detail
    Type: STRING
    Provider name: statusDetail
    Description: Output only. Customer-readable message about the current status.
  • steps
    Type: UNORDERED_LIST_STRUCT
    Provider name: steps
    Description: Required. The operations to be performed on the workspace.
    • allow_exit_codes
      Type: UNORDERED_LIST_INT32
      Provider name: allowExitCodes
      Description: 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.
    • allow_failure
      Type: BOOLEAN
      Provider name: allowFailure
      Description: 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.
    • args
      Type: UNORDERED_LIST_STRING
      Provider name: args
      Description: 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.
    • automap_substitutions
      Type: BOOLEAN
      Provider name: automapSubstitutions
      Description: Option to include built-in and custom substitutions as env variables for this build step. This option will override the global option in BuildOption.
    • dir
      Type: STRING
      Provider name: dir
      Description: 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 with dir and a step with a dir, which specifies an absolute path, the RepoSource dir is ignored for the step’s execution.
    • entrypoint
      Type: STRING
      Provider name: entrypoint
      Description: Entrypoint to be used instead of the build step image’s default entrypoint. If unset, the image’s default entrypoint is used.
    • env
      Type: UNORDERED_LIST_STRING
      Provider name: env
      Description: 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”.
    • exit_code
      Type: INT32
      Provider name: exitCode
      Description: Output only. Return code from running the step.
    • gcp_status
      Type: STRING
      Provider name: status
      Description: 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.
      Possible values:
      • STATUS_UNKNOWN - Status of the build is unknown.
      • PENDING - Build has been created and is pending execution and queuing. It has not been queued.
      • QUEUED - Build or step is queued; work has not yet begun.
      • WORKING - Build or step is being executed.
      • SUCCESS - Build or step finished successfully.
      • FAILURE - Build or step failed to complete successfully.
      • INTERNAL_ERROR - Build or step failed due to an internal cause.
      • TIMEOUT - Build or step took longer than was allowed.
      • CANCELLED - Build or step was canceled by a user.
      • EXPIRED - Build was enqueued for longer than the value of queue_ttl.
    • id
      Type: STRING
      Provider name: id
      Description: Unique identifier for this build step, used in wait_for to reference this build step as a dependency.
    • name
      Type: STRING
      Provider name: name
      Description: 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.
    • pull_timing
      Type: STRUCT
      Provider name: pullTiming
      Description: Output only. Stores timing information for pulling this build step’s builder image only.
      • end_time
        Type: TIMESTAMP
        Provider name: endTime
        Description: End of time span.
      • start_time
        Type: TIMESTAMP
        Provider name: startTime
        Description: Start of time span.
    • script
      Type: STRING
      Provider name: script
      Description: A shell script to be executed in the step. When script is provided, the user cannot specify the entrypoint or args.
    • secret_env
      Type: UNORDERED_LIST_STRING
      Provider name: secretEnv
      Description: 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.
    • timeout
      Type: STRING
      Provider name: timeout
      Description: 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.
    • timing
      Type: STRUCT
      Provider name: timing
      Description: Output only. Stores timing information for executing this build step.
      • end_time
        Type: TIMESTAMP
        Provider name: endTime
        Description: End of time span.
      • start_time
        Type: TIMESTAMP
        Provider name: startTime
        Description: Start of time span.
    • volumes
      Type: UNORDERED_LIST_STRUCT
      Provider name: volumes
      Description: 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.
      • name
        Type: STRING
        Provider name: name
        Description: 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.
      • path
        Type: STRING
        Provider name: path
        Description: Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.
    • wait_for
      Type: UNORDERED_LIST_STRING
      Provider name: waitFor
      Description: 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. If wait_for is empty, this build step will start when all previous build steps in the Build.Steps list have completed successfully.
  • timeout
    Type: STRING
    Provider name: timeout
    Description: 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 from startTime. Default time is 60 minutes.
  • warnings
    Type: UNORDERED_LIST_STRUCT
    Provider name: warnings
    Description: Output only. Non-fatal problems encountered during the execution of the build.
    • priority
      Type: STRING
      Provider name: priority
      Description: The priority for this warning.
      Possible values:
      • PRIORITY_UNSPECIFIED - Should not be used.
      • INFO - e.g. deprecation warnings and alternative feature highlights.
      • WARNING - e.g. automated detection of possible issues with the build.
      • ALERT - e.g. alerts that a feature used in the build is pending removal
    • text
      Type: STRING
      Provider name: text
      Description: Explanation of the warning generated.

create_time

Type: TIMESTAMP
Provider name: createTime
Description: Output only. Time when the trigger was created.

description

Type: STRING
Provider name: description
Description: Human-readable description of this trigger.

disabled

Type: BOOLEAN
Provider name: disabled
Description: If true, the trigger will never automatically execute a build.

event_type

Type: STRING
Provider name: eventType
Description: EventType allows the user to explicitly set the type of event to which this BuildTrigger should respond. This field will be validated against the rest of the configuration if it is set.
Possible values:

  • EVENT_TYPE_UNSPECIFIED - EVENT_TYPE_UNSPECIFIED event_types are ignored.
  • REPO - REPO corresponds to the supported VCS integrations.
  • WEBHOOK - WEBHOOK corresponds to webhook triggers.
  • PUBSUB - PUBSUB corresponds to pubsub triggers.
  • MANUAL - MANUAL corresponds to manual-only invoked triggers.

filename

Type: STRING
Provider name: filename
Description: Path, from the source root, to the build configuration file (i.e. cloudbuild.yaml).

filter

Type: STRING
Provider name: filter
Description: A Common Expression Language string.

git_file_source

Type: STRUCT
Provider name: gitFileSource
Description: The file source describing the local or remote Build template.

  • bitbucket_server_config
    Type: STRING
    Provider name: bitbucketServerConfig
    Description: The full resource name of the bitbucket server config. Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
  • github_enterprise_config
    Type: STRING
    Provider name: githubEnterpriseConfig
    Description: The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
  • path
    Type: STRING
    Provider name: path
    Description: The path of the file, with the repo root as the root of the path.
  • repo_type
    Type: STRING
    Provider name: repoType
    Description: See RepoType above.
    Possible values:
    • UNKNOWN - The default, unknown repo type. Don’t use it, instead use one of the other repo types.
    • CLOUD_SOURCE_REPOSITORIES - A Google Cloud Source Repositories-hosted repo.
    • GITHUB - A GitHub-hosted repo not necessarily on ‘github.com’ (i.e. GitHub Enterprise).
    • BITBUCKET_SERVER - A Bitbucket Server-hosted repo.
    • GITLAB - A GitLab-hosted repo.
    • BITBUCKET_CLOUD - A Bitbucket Cloud-hosted repo.
  • repository
    Type: STRING
    Provider name: repository
    Description: 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.
  • revision
    Type: STRING
    Provider name: revision
    Description: 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.
  • uri
    Type: STRING
    Provider name: uri
    Description: 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.

github

Type: STRUCT
Provider name: github
Description: GitHubEventsConfig describes the configuration of a trigger that creates a build whenever a GitHub event is received. Mutually exclusive with trigger_template.

  • enterprise_config_resource_name
    Type: STRING
    Provider name: enterpriseConfigResourceName
    Description: The resource name of the github enterprise config that should be applied to this installation. For example: “projects/{$project_id}/locations/{$location_id}/githubEnterpriseConfigs/{$config_id}"
  • installation_id
    Type: INT64
    Provider name: installationId
    Description: The installationID that emits the GitHub event.
  • name
    Type: STRING
    Provider name: name
    Description: Name of the repository. For example: The name for https://github.com/googlecloudplatform/cloud-builders is “cloud-builders”.
  • owner
    Type: STRING
    Provider name: owner
    Description: Owner of the repository. For example: The owner for https://github.com/googlecloudplatform/cloud-builders is “googlecloudplatform”.
  • pull_request
    Type: STRUCT
    Provider name: pullRequest
    Description: filter to match changes in pull requests.
    • branch
      Type: STRING
      Provider name: branch
      Description: 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
    • comment_control
      Type: STRING
      Provider name: commentControl
      Description: If CommentControl is enabled, depending on the setting, builds may not fire until a repository writer comments /gcbrun on a pull request or /gcbrun is in the pull request description. Only PR comments that contain /gcbrun will trigger builds. If CommentControl is set to disabled, comments with /gcbrun from a user with repository write permission or above will still trigger builds to run.
      Possible values:
      • COMMENTS_DISABLED - Do not require /gcbrun comments from a user with repository write permission or above on pull requests before builds are triggered. Comments that contain /gcbrun will still fire builds so this should be thought of as comments not required.
      • COMMENTS_ENABLED - Builds will only fire in response to pull requests if: 1. The pull request author has repository write permission or above and /gcbrun is in the PR description. 2. A user with repository writer permissions or above comments /gcbrun on a pull request authored by any user.
      • COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY - Builds will only fire in response to pull requests if: 1. The pull request author is a repository writer or above. 2. If the author does not have write permissions, a user with write permissions or above must comment /gcbrun in order to fire a build.
    • invert_regex
      Type: BOOLEAN
      Provider name: invertRegex
      Description: If true, branches that do NOT match the git_ref will trigger a build.
  • push
    Type: STRUCT
    Provider name: push
    Description: filter to match changes in refs like branches, tags.
    • branch
      Type: STRING
      Provider name: branch
      Description: 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
    • invert_regex
      Type: BOOLEAN
      Provider name: invertRegex
      Description: When true, only trigger a build if the revision regex does NOT match the git_ref regex.
    • tag
      Type: STRING
      Provider name: tag
      Description: 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

gitlab_enterprise_events_config

Type: STRUCT
Provider name: gitlabEnterpriseEventsConfig
Description: GitLabEnterpriseEventsConfig describes the configuration of a trigger that creates a build whenever a GitLab Enterprise event is received.

  • gitlab_config
    Type: STRUCT
    Provider name: gitlabConfig
    Description: Output only. The GitLabConfig specified in the gitlab_config_resource field.
    • connected_repositories
      Type: UNORDERED_LIST_STRUCT
      Provider name: connectedRepositories
      Description: Connected GitLab.com or GitLabEnterprise repositories for this config.
      • id
        Type: STRING
        Provider name: id
        Description: Required. Identifier for the repository. example: “namespace/project-slug”, namespace is usually the username or group ID
      • webhook_id
        Type: INT32
        Provider name: webhookId
        Description: Output only. The ID of the webhook that was created for receiving events from this repo. We only create and manage a single webhook for each repo.
    • create_time
      Type: TIMESTAMP
      Provider name: createTime
      Description: Output only. Time when the config was created.
    • enterprise_config
      Type: STRUCT
      Provider name: enterpriseConfig
      Description: Optional. GitLabEnterprise config.
      • host_uri
        Type: STRING
        Provider name: hostUri
        Description: Immutable. The URI of the GitlabEnterprise host.
      • service_directory_config
        Type: STRUCT
        Provider name: serviceDirectoryConfig
        Description: The Service Directory configuration to be used when reaching out to the GitLab Enterprise instance.
        • service
          Type: STRING
          Provider name: service
          Description: The Service Directory service name. Format: projects/{project}/locations/{location}/namespaces/{namespace}/services/{service}.
      • ssl_ca
        Type: STRING
        Provider name: sslCa
        Description: The SSL certificate to use in requests to GitLab Enterprise instances.
    • name
      Type: STRING
      Provider name: name
      Description: The resource name for the config.
    • secrets
      Type: STRUCT
      Provider name: secrets
      Description: Required. Secret Manager secrets needed by the config.
      • api_access_token_version
        Type: STRING
        Provider name: apiAccessTokenVersion
        Description: Required. The resource name for the api access token’s secret version
      • api_key_version
        Type: STRING
        Provider name: apiKeyVersion
        Description: Required. Immutable. API Key that will be attached to webhook requests from GitLab to Cloud Build.
      • read_access_token_version
        Type: STRING
        Provider name: readAccessTokenVersion
        Description: Required. The resource name for the read access token’s secret version
      • webhook_secret_version
        Type: STRING
        Provider name: webhookSecretVersion
        Description: Required. Immutable. The resource name for the webhook secret’s secret version. Once this field has been set, it cannot be changed. If you need to change it, please create another GitLabConfig.
    • username
      Type: STRING
      Provider name: username
      Description: Username of the GitLab.com or GitLab Enterprise account Cloud Build will use.
    • webhook_key
      Type: STRING
      Provider name: webhookKey
      Description: Output only. UUID included in webhook requests. The UUID is used to look up the corresponding config.
  • gitlab_config_resource
    Type: STRING
    Provider name: gitlabConfigResource
    Description: The GitLab config resource that this trigger config maps to.
  • project_namespace
    Type: STRING
    Provider name: projectNamespace
    Description: Namespace of the GitLab project.
  • pull_request
    Type: STRUCT
    Provider name: pullRequest
    Description: Filter to match changes in pull requests.
    • branch
      Type: STRING
      Provider name: branch
      Description: 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
    • comment_control
      Type: STRING
      Provider name: commentControl
      Description: If CommentControl is enabled, depending on the setting, builds may not fire until a repository writer comments /gcbrun on a pull request or /gcbrun is in the pull request description. Only PR comments that contain /gcbrun will trigger builds. If CommentControl is set to disabled, comments with /gcbrun from a user with repository write permission or above will still trigger builds to run.
      Possible values:
      • COMMENTS_DISABLED - Do not require /gcbrun comments from a user with repository write permission or above on pull requests before builds are triggered. Comments that contain /gcbrun will still fire builds so this should be thought of as comments not required.
      • COMMENTS_ENABLED - Builds will only fire in response to pull requests if: 1. The pull request author has repository write permission or above and /gcbrun is in the PR description. 2. A user with repository writer permissions or above comments /gcbrun on a pull request authored by any user.
      • COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY - Builds will only fire in response to pull requests if: 1. The pull request author is a repository writer or above. 2. If the author does not have write permissions, a user with write permissions or above must comment /gcbrun in order to fire a build.
    • invert_regex
      Type: BOOLEAN
      Provider name: invertRegex
      Description: If true, branches that do NOT match the git_ref will trigger a build.
  • push
    Type: STRUCT
    Provider name: push
    Description: Filter to match changes in refs like branches, tags.
    • branch
      Type: STRING
      Provider name: branch
      Description: 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
    • invert_regex
      Type: BOOLEAN
      Provider name: invertRegex
      Description: When true, only trigger a build if the revision regex does NOT match the git_ref regex.
    • tag
      Type: STRING
      Provider name: tag
      Description: 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

id

Type: STRING
Provider name: id
Description: Output only. Unique identifier of the trigger.

ignored_files

Type: UNORDERED_LIST_STRING
Provider name: ignoredFiles
Description: 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.

include_build_logs

Type: STRING
Provider name: includeBuildLogs
Description: If set to INCLUDE_BUILD_LOGS_WITH_STATUS, log url will be shown on GitHub page when build status is final. Setting this field to INCLUDE_BUILD_LOGS_WITH_STATUS for non GitHub triggers results in INVALID_ARGUMENT error.
Possible values:

  • INCLUDE_BUILD_LOGS_UNSPECIFIED - Build logs will not be shown on GitHub.
  • INCLUDE_BUILD_LOGS_WITH_STATUS - Build logs will be shown on GitHub.

included_files

Type: UNORDERED_LIST_STRING
Provider name: includedFiles
Description: 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.

labels

Type: UNORDERED_LIST_STRING

name

Type: STRING
Provider name: name
Description: 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.

organization_id

Type: STRING

parent

Type: STRING

project_id

Type: STRING

project_number

Type: STRING

pubsub_config

Type: STRUCT
Provider name: pubsubConfig
Description: PubsubConfig describes the configuration of a trigger that creates a build whenever a Pub/Sub message is published.

  • service_account_email
    Type: STRING
    Provider name: serviceAccountEmail
    Description: Service account that will make the push request.
  • state
    Type: STRING
    Provider name: state
    Description: Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.
    Possible values:
    • STATE_UNSPECIFIED - The subscription configuration has not been checked.
    • OK - The Pub/Sub subscription is properly configured.
    • SUBSCRIPTION_DELETED - The subscription has been deleted.
    • TOPIC_DELETED - The topic has been deleted.
    • SUBSCRIPTION_MISCONFIGURED - Some of the subscription’s field are misconfigured.
  • subscription
    Type: STRING
    Provider name: subscription
    Description: Output only. Name of the subscription. Format is projects/{project}/subscriptions/{subscription}.
  • topic
    Type: STRING
    Provider name: topic
    Description: Optional. The name of the topic from which this subscription is receiving messages. Format is projects/{project}/topics/{topic}.

repository_event_config

Type: STRUCT
Provider name: repositoryEventConfig
Description: The configuration of a trigger that creates a build whenever an event from Repo API is received.

  • pull_request
    Type: STRUCT
    Provider name: pullRequest
    Description: Filter to match changes in pull requests.
    • branch
      Type: STRING
      Provider name: branch
      Description: 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
    • comment_control
      Type: STRING
      Provider name: commentControl
      Description: If CommentControl is enabled, depending on the setting, builds may not fire until a repository writer comments /gcbrun on a pull request or /gcbrun is in the pull request description. Only PR comments that contain /gcbrun will trigger builds. If CommentControl is set to disabled, comments with /gcbrun from a user with repository write permission or above will still trigger builds to run.
      Possible values:
      • COMMENTS_DISABLED - Do not require /gcbrun comments from a user with repository write permission or above on pull requests before builds are triggered. Comments that contain /gcbrun will still fire builds so this should be thought of as comments not required.
      • COMMENTS_ENABLED - Builds will only fire in response to pull requests if: 1. The pull request author has repository write permission or above and /gcbrun is in the PR description. 2. A user with repository writer permissions or above comments /gcbrun on a pull request authored by any user.
      • COMMENTS_ENABLED_FOR_EXTERNAL_CONTRIBUTORS_ONLY - Builds will only fire in response to pull requests if: 1. The pull request author is a repository writer or above. 2. If the author does not have write permissions, a user with write permissions or above must comment /gcbrun in order to fire a build.
    • invert_regex
      Type: BOOLEAN
      Provider name: invertRegex
      Description: If true, branches that do NOT match the git_ref will trigger a build.
  • push
    Type: STRUCT
    Provider name: push
    Description: Filter to match changes in refs like branches, tags.
    • branch
      Type: STRING
      Provider name: branch
      Description: 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
    • invert_regex
      Type: BOOLEAN
      Provider name: invertRegex
      Description: When true, only trigger a build if the revision regex does NOT match the git_ref regex.
    • tag
      Type: STRING
      Provider name: tag
      Description: 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
  • repository
    Type: STRING
    Provider name: repository
    Description: The resource name of the Repo API resource.
  • repository_type
    Type: STRING
    Provider name: repositoryType
    Description: Output only. The type of the SCM vendor the repository points to.
    Possible values:
    • REPOSITORY_TYPE_UNSPECIFIED - If unspecified, RepositoryType defaults to GITHUB.
    • GITHUB - The SCM repo is GITHUB.
    • GITHUB_ENTERPRISE - The SCM repo is GITHUB Enterprise.
    • GITLAB_ENTERPRISE - The SCM repo is GITLAB Enterprise.
    • BITBUCKET_DATA_CENTER - The SCM repo is BITBUCKET Data Center.
    • BITBUCKET_CLOUD - The SCM repo is BITBUCKET Cloud.

resource_name

Type: STRING

service_account

Type: STRING
Provider name: serviceAccount
Description: The service account used for all user-controlled operations including UpdateBuildTrigger, RunBuildTrigger, CreateBuild, and CancelBuild. If no service account is set and the legacy Cloud Build service account ([PROJECT_NUM]@cloudbuild.gserviceaccount.com) is the default for the project then it will be used instead. Format: projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_ID_OR_EMAIL}

source_to_build

Type: STRUCT
Provider name: sourceToBuild
Description: 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.

  • bitbucket_server_config
    Type: STRING
    Provider name: bitbucketServerConfig
    Description: The full resource name of the bitbucket server config. Format: projects/{project}/locations/{location}/bitbucketServerConfigs/{id}.
  • github_enterprise_config
    Type: STRING
    Provider name: githubEnterpriseConfig
    Description: The full resource name of the github enterprise config. Format: projects/{project}/locations/{location}/githubEnterpriseConfigs/{id}. projects/{project}/githubEnterpriseConfigs/{id}.
  • ref
    Type: STRING
    Provider name: ref
    Description: The branch or tag to use. Must start with “refs/” (required).
  • repo_type
    Type: STRING
    Provider name: repoType
    Description: See RepoType below.
    Possible values:
    • UNKNOWN - The default, unknown repo type. Don’t use it, instead use one of the other repo types.
    • CLOUD_SOURCE_REPOSITORIES - A Google Cloud Source Repositories-hosted repo.
    • GITHUB - A GitHub-hosted repo not necessarily on ‘github.com’ (i.e. GitHub Enterprise).
    • BITBUCKET_SERVER - A Bitbucket Server-hosted repo.
    • GITLAB - A GitLab-hosted repo.
    • BITBUCKET_CLOUD - A Bitbucket Cloud-hosted repo.
  • repository
    Type: STRING
    Provider name: repository
    Description: The connected repository resource name, in the format projects/*/locations/*/connections/*/repositories/*. Either uri or repository can be specified and is required.
  • uri
    Type: STRING
    Provider name: uri
    Description: The URI of the repo (e.g. https://github.com/user/repo.git). Either uri or repository can be specified and is required.

tags

Type: UNORDERED_LIST_STRING

trigger_template

Type: STRUCT
Provider name: triggerTemplate
Description: 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.

  • branch_name
    Type: STRING
    Provider name: branchName
    Description: 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
  • commit_sha
    Type: STRING
    Provider name: commitSha
    Description: Explicit commit SHA to build.
  • dir
    Type: STRING
    Provider name: dir
    Description: Optional. 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.
  • invert_regex
    Type: BOOLEAN
    Provider name: invertRegex
    Description: Optional. Only trigger a build if the revision regex does NOT match the revision regex.
  • project_id
    Type: STRING
    Provider name: projectId
    Description: Optional. ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.
  • repo_name
    Type: STRING
    Provider name: repoName
    Description: Required. Name of the Cloud Source Repository.
  • tag_name
    Type: STRING
    Provider name: tagName
    Description: 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

webhook_config

Type: STRUCT
Provider name: webhookConfig
Description: WebhookConfig describes the configuration of a trigger that creates a build whenever a webhook is sent to a trigger’s webhook URL.

  • secret
    Type: STRING
    Provider name: secret
    Description: Required. Resource name for the secret required as a URL parameter.
  • state
    Type: STRING
    Provider name: state
    Description: Potential issues with the underlying Pub/Sub subscription configuration. Only populated on get requests.
    Possible values:
    • STATE_UNSPECIFIED - The webhook auth configuration not been checked.
    • OK - The auth configuration is properly setup.
    • SECRET_DELETED - The secret provided in auth_method has been deleted.