1 parent
2634c95e95
commit
88c64fe87e
77 files changed
+27214
-23135
No files matched your search
@@ -22,6 +22,264 @@ module Google
|
||||
module Apis
|
||||
module CloudbuildV1
|
||||
|
||||
# A generic empty message that you can re-use to avoid defining duplicated
|
||||
# empty messages in your APIs. A typical example is to use it as the request
|
||||
# or the response type of an API method. For instance:
|
||||
# service Foo `
|
||||
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
# `
|
||||
# The JSON representation for `Empty` is empty JSON object ````.
|
||||
class Empty
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# Configuration for an automated build in response to source repository
|
||||
# changes.
|
||||
class BuildTrigger
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Unique identifier of the trigger.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# A build resource in the Container Builder 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 what tag to
|
||||
# apply to the built image when it is pushed to Google Container Registry.
|
||||
# Fields can include the following variables which will be expanded when the
|
||||
# build is created:
|
||||
# - $PROJECT_ID: the project ID 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.
|
||||
# Corresponds to the JSON property `build`
|
||||
# @return [Google::Apis::CloudbuildV1::Build]
|
||||
attr_accessor :build
|
||||
|
||||
# Human-readable description of this trigger.
|
||||
# Corresponds to the JSON property `description`
|
||||
# @return [String]
|
||||
attr_accessor :description
|
||||
|
||||
# If true, the trigger will never result in a build.
|
||||
# Corresponds to the JSON property `disabled`
|
||||
# @return [Boolean]
|
||||
attr_accessor :disabled
|
||||
alias_method :disabled?, :disabled
|
||||
|
||||
# Time when the trigger was created.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `createTime`
|
||||
# @return [String]
|
||||
attr_accessor :create_time
|
||||
|
||||
# Path, from the source root, to a file whose contents is used for the
|
||||
# template.
|
||||
# Corresponds to the JSON property `filename`
|
||||
# @return [String]
|
||||
attr_accessor :filename
|
||||
|
||||
# RepoSource describes the location of the source in a Google Cloud Source
|
||||
# Repository.
|
||||
# Corresponds to the JSON property `triggerTemplate`
|
||||
# @return [Google::Apis::CloudbuildV1::RepoSource]
|
||||
attr_accessor :trigger_template
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@build = args[:build] if args.key?(:build)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
@disabled = args[:disabled] if args.key?(:disabled)
|
||||
@create_time = args[:create_time] if args.key?(:create_time)
|
||||
@filename = args[:filename] if args.key?(:filename)
|
||||
@trigger_template = args[:trigger_template] if args.key?(:trigger_template)
|
||||
end
|
||||
end
|
||||
|
||||
# A build resource in the Container Builder 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 what tag to
|
||||
# apply to the built image when it is pushed to Google Container Registry.
|
||||
# Fields can include the following variables which will be expanded when the
|
||||
# build is created:
|
||||
# - $PROJECT_ID: the project ID 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.
|
||||
class Build
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Time at which execution of the build was started.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `startTime`
|
||||
# @return [String]
|
||||
attr_accessor :start_time
|
||||
|
||||
# Provenance of the source. Ways to find the original source, or verify that
|
||||
# some source was used for this build.
|
||||
# Corresponds to the JSON property `sourceProvenance`
|
||||
# @return [Google::Apis::CloudbuildV1::SourceProvenance]
|
||||
attr_accessor :source_provenance
|
||||
|
||||
# Time at which the request to create the build was received.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `createTime`
|
||||
# @return [String]
|
||||
attr_accessor :create_time
|
||||
|
||||
# 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.
|
||||
# Corresponds to the JSON property `images`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :images
|
||||
|
||||
# ID of the project.
|
||||
# @OutputOnly.
|
||||
# Corresponds to the JSON property `projectId`
|
||||
# @return [String]
|
||||
attr_accessor :project_id
|
||||
|
||||
# URL to logs for this build in Google Cloud Logging.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `logUrl`
|
||||
# @return [String]
|
||||
attr_accessor :log_url
|
||||
|
||||
# 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.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `finishTime`
|
||||
# @return [String]
|
||||
attr_accessor :finish_time
|
||||
|
||||
# Source describes the location of the source in a supported storage
|
||||
# service.
|
||||
# Corresponds to the JSON property `source`
|
||||
# @return [Google::Apis::CloudbuildV1::Source]
|
||||
attr_accessor :source
|
||||
|
||||
# Optional arguments to enable specific features of builds.
|
||||
# Corresponds to the JSON property `options`
|
||||
# @return [Google::Apis::CloudbuildV1::BuildOptions]
|
||||
attr_accessor :options
|
||||
|
||||
# Customer-readable message about the current status.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `statusDetail`
|
||||
# @return [String]
|
||||
attr_accessor :status_detail
|
||||
|
||||
# Status of the build.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `status`
|
||||
# @return [String]
|
||||
attr_accessor :status
|
||||
|
||||
# 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.
|
||||
# Default time is ten minutes.
|
||||
# Corresponds to the JSON property `timeout`
|
||||
# @return [String]
|
||||
attr_accessor :timeout
|
||||
|
||||
# Google Cloud Storage bucket where logs should be written (see
|
||||
# [Bucket Name
|
||||
# Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
|
||||
# ).
|
||||
# Logs file names will be of the format `$`logs_bucket`/log-$`build_id`.txt`.
|
||||
# Corresponds to the JSON property `logsBucket`
|
||||
# @return [String]
|
||||
attr_accessor :logs_bucket
|
||||
|
||||
# Results describes the artifacts created by the build pipeline.
|
||||
# Corresponds to the JSON property `results`
|
||||
# @return [Google::Apis::CloudbuildV1::Results]
|
||||
attr_accessor :results
|
||||
|
||||
# Describes the operations to be performed on the workspace.
|
||||
# Corresponds to the JSON property `steps`
|
||||
# @return [Array<Google::Apis::CloudbuildV1::BuildStep>]
|
||||
attr_accessor :steps
|
||||
|
||||
# The ID of the BuildTrigger that triggered this build, if it was
|
||||
# triggered automatically.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `buildTriggerId`
|
||||
# @return [String]
|
||||
attr_accessor :build_trigger_id
|
||||
|
||||
# Unique identifier of the build.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@start_time = args[:start_time] if args.key?(:start_time)
|
||||
@source_provenance = args[:source_provenance] if args.key?(:source_provenance)
|
||||
@create_time = args[:create_time] if args.key?(:create_time)
|
||||
@images = args[:images] if args.key?(:images)
|
||||
@project_id = args[:project_id] if args.key?(:project_id)
|
||||
@log_url = args[:log_url] if args.key?(:log_url)
|
||||
@finish_time = args[:finish_time] if args.key?(:finish_time)
|
||||
@source = args[:source] if args.key?(:source)
|
||||
@options = args[:options] if args.key?(:options)
|
||||
@status_detail = args[:status_detail] if args.key?(:status_detail)
|
||||
@status = args[:status] if args.key?(:status)
|
||||
@timeout = args[:timeout] if args.key?(:timeout)
|
||||
@logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket)
|
||||
@results = args[:results] if args.key?(:results)
|
||||
@steps = args[:steps] if args.key?(:steps)
|
||||
@build_trigger_id = args[:build_trigger_id] if args.key?(:build_trigger_id)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
end
|
||||
end
|
||||
|
||||
# Request to cancel an ongoing build.
|
||||
class CancelBuildRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# Response including listed builds.
|
||||
class ListBuildsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
@@ -167,24 +425,24 @@ module Google
|
||||
class Results
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Images that were built as a part of the build.
|
||||
# Corresponds to the JSON property `images`
|
||||
# @return [Array<Google::Apis::CloudbuildV1::BuiltImage>]
|
||||
attr_accessor :images
|
||||
|
||||
# List of build step digests, in order corresponding to build step indices.
|
||||
# Corresponds to the JSON property `buildStepImages`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :build_step_images
|
||||
|
||||
# Images that were built as a part of the build.
|
||||
# Corresponds to the JSON property `images`
|
||||
# @return [Array<Google::Apis::CloudbuildV1::BuiltImage>]
|
||||
attr_accessor :images
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@images = args[:images] if args.key?(:images)
|
||||
@build_step_images = args[:build_step_images] if args.key?(:build_step_images)
|
||||
@images = args[:images] if args.key?(:images)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -278,26 +536,6 @@ module Google
|
||||
class Operation
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# If the value is `false`, it means the operation is still in progress.
|
||||
# If true, the operation is completed, and either `error` or `response` is
|
||||
# available.
|
||||
# Corresponds to the JSON property `done`
|
||||
# @return [Boolean]
|
||||
attr_accessor :done
|
||||
alias_method :done?, :done
|
||||
|
||||
# The normal response of the operation in case of success. If the original
|
||||
# method returns no data on success, such as `Delete`, the response is
|
||||
# `google.protobuf.Empty`. If the original method is standard
|
||||
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
||||
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
||||
# is the original method name. For example, if the original method name
|
||||
# is `TakeSnapshot()`, the inferred response type is
|
||||
# `TakeSnapshotResponse`.
|
||||
# Corresponds to the JSON property `response`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :response
|
||||
|
||||
# The server-assigned name, which is only unique within the same service that
|
||||
# originally returns it. If you use the default HTTP mapping, the
|
||||
# `name` should have the format of `operations/some/unique/name`.
|
||||
@@ -356,17 +594,37 @@ module Google
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :metadata
|
||||
|
||||
# If the value is `false`, it means the operation is still in progress.
|
||||
# If true, the operation is completed, and either `error` or `response` is
|
||||
# available.
|
||||
# Corresponds to the JSON property `done`
|
||||
# @return [Boolean]
|
||||
attr_accessor :done
|
||||
alias_method :done?, :done
|
||||
|
||||
# The normal response of the operation in case of success. If the original
|
||||
# method returns no data on success, such as `Delete`, the response is
|
||||
# `google.protobuf.Empty`. If the original method is standard
|
||||
# `Get`/`Create`/`Update`, the response should be the resource. For other
|
||||
# methods, the response should have the type `XxxResponse`, where `Xxx`
|
||||
# is the original method name. For example, if the original method name
|
||||
# is `TakeSnapshot()`, the inferred response type is
|
||||
# `TakeSnapshotResponse`.
|
||||
# Corresponds to the JSON property `response`
|
||||
# @return [Hash<String,Object>]
|
||||
attr_accessor :response
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@done = args[:done] if args.key?(:done)
|
||||
@response = args[:response] if args.key?(:response)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@error = args[:error] if args.key?(:error)
|
||||
@metadata = args[:metadata] if args.key?(:metadata)
|
||||
@done = args[:done] if args.key?(:done)
|
||||
@response = args[:response] if args.key?(:response)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -419,6 +677,43 @@ module Google
|
||||
class BuildStep
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Optional unique identifier for this build step, used in wait_for to
|
||||
# reference this build step as a dependency.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Working directory (relative to project source root) to use when running
|
||||
# this operation's container.
|
||||
# Corresponds to the JSON property `dir`
|
||||
# @return [String]
|
||||
attr_accessor :dir
|
||||
|
||||
# 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".
|
||||
# Corresponds to the JSON property `env`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :env
|
||||
|
||||
# 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.
|
||||
# Corresponds to the JSON property `waitFor`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :wait_for
|
||||
|
||||
# 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, these args
|
||||
# will be used as arguments to that entrypoint. If the image does not define
|
||||
# an entrypoint, the first element in args will be used as the entrypoint,
|
||||
# and the remainder will be used as arguments.
|
||||
# Corresponds to the JSON property `args`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :args
|
||||
|
||||
# The name of the container image that will run this particular build step.
|
||||
# If the image is already available in the host's Docker daemon's cache, it
|
||||
# will be run directly. If not, the host will attempt to pull the image
|
||||
@@ -442,56 +737,19 @@ module Google
|
||||
# @return [String]
|
||||
attr_accessor :entrypoint
|
||||
|
||||
# Optional unique identifier for this build step, used in wait_for to
|
||||
# reference this build step as a dependency.
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Working directory (relative to project source root) to use when running
|
||||
# this operation's container.
|
||||
# Corresponds to the JSON property `dir`
|
||||
# @return [String]
|
||||
attr_accessor :dir
|
||||
|
||||
# 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.
|
||||
# Corresponds to the JSON property `waitFor`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :wait_for
|
||||
|
||||
# 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".
|
||||
# Corresponds to the JSON property `env`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :env
|
||||
|
||||
# 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, these args
|
||||
# will be used as arguments to that entrypoint. If the image does not define
|
||||
# an entrypoint, the first element in args will be used as the entrypoint,
|
||||
# and the remainder will be used as arguments.
|
||||
# Corresponds to the JSON property `args`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :args
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@entrypoint = args[:entrypoint] if args.key?(:entrypoint)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@dir = args[:dir] if args.key?(:dir)
|
||||
@wait_for = args[:wait_for] if args.key?(:wait_for)
|
||||
@env = args[:env] if args.key?(:env)
|
||||
@wait_for = args[:wait_for] if args.key?(:wait_for)
|
||||
@args = args[:args] if args.key?(:args)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@entrypoint = args[:entrypoint] if args.key?(:entrypoint)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -500,16 +758,6 @@ module Google
|
||||
class RepoSource
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Name of the tag to build.
|
||||
# Corresponds to the JSON property `tagName`
|
||||
# @return [String]
|
||||
attr_accessor :tag_name
|
||||
|
||||
# Explicit commit SHA to build.
|
||||
# Corresponds to the JSON property `commitSha`
|
||||
# @return [String]
|
||||
attr_accessor :commit_sha
|
||||
|
||||
# ID of the project that owns the repo. If omitted, the project ID requesting
|
||||
# the build is assumed.
|
||||
# Corresponds to the JSON property `projectId`
|
||||
@@ -526,17 +774,27 @@ module Google
|
||||
# @return [String]
|
||||
attr_accessor :branch_name
|
||||
|
||||
# Name of the tag to build.
|
||||
# Corresponds to the JSON property `tagName`
|
||||
# @return [String]
|
||||
attr_accessor :tag_name
|
||||
|
||||
# Explicit commit SHA to build.
|
||||
# Corresponds to the JSON property `commitSha`
|
||||
# @return [String]
|
||||
attr_accessor :commit_sha
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@tag_name = args[:tag_name] if args.key?(:tag_name)
|
||||
@commit_sha = args[:commit_sha] if args.key?(:commit_sha)
|
||||
@project_id = args[:project_id] if args.key?(:project_id)
|
||||
@repo_name = args[:repo_name] if args.key?(:repo_name)
|
||||
@branch_name = args[:branch_name] if args.key?(:branch_name)
|
||||
@tag_name = args[:tag_name] if args.key?(:tag_name)
|
||||
@commit_sha = args[:commit_sha] if args.key?(:commit_sha)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -656,264 +914,6 @@ module Google
|
||||
@code = args[:code] if args.key?(:code)
|
||||
end
|
||||
end
|
||||
|
||||
# A generic empty message that you can re-use to avoid defining duplicated
|
||||
# empty messages in your APIs. A typical example is to use it as the request
|
||||
# or the response type of an API method. For instance:
|
||||
# service Foo `
|
||||
# rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
# `
|
||||
# The JSON representation for `Empty` is empty JSON object ````.
|
||||
class Empty
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# Configuration for an automated build in response to source repository
|
||||
# changes.
|
||||
class BuildTrigger
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Time when the trigger was created.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `createTime`
|
||||
# @return [String]
|
||||
attr_accessor :create_time
|
||||
|
||||
# If true, the trigger will never result in a build.
|
||||
# Corresponds to the JSON property `disabled`
|
||||
# @return [Boolean]
|
||||
attr_accessor :disabled
|
||||
alias_method :disabled?, :disabled
|
||||
|
||||
# RepoSource describes the location of the source in a Google Cloud Source
|
||||
# Repository.
|
||||
# Corresponds to the JSON property `triggerTemplate`
|
||||
# @return [Google::Apis::CloudbuildV1::RepoSource]
|
||||
attr_accessor :trigger_template
|
||||
|
||||
# Path, from the source root, to a file whose contents is used for the
|
||||
# template.
|
||||
# Corresponds to the JSON property `filename`
|
||||
# @return [String]
|
||||
attr_accessor :filename
|
||||
|
||||
# Unique identifier of the trigger.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# A build resource in the Container Builder 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 what tag to
|
||||
# apply to the built image when it is pushed to Google Container Registry.
|
||||
# Fields can include the following variables which will be expanded when the
|
||||
# build is created:
|
||||
# - $PROJECT_ID: the project ID 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.
|
||||
# Corresponds to the JSON property `build`
|
||||
# @return [Google::Apis::CloudbuildV1::Build]
|
||||
attr_accessor :build
|
||||
|
||||
# Human-readable description of this trigger.
|
||||
# Corresponds to the JSON property `description`
|
||||
# @return [String]
|
||||
attr_accessor :description
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@create_time = args[:create_time] if args.key?(:create_time)
|
||||
@disabled = args[:disabled] if args.key?(:disabled)
|
||||
@trigger_template = args[:trigger_template] if args.key?(:trigger_template)
|
||||
@filename = args[:filename] if args.key?(:filename)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@build = args[:build] if args.key?(:build)
|
||||
@description = args[:description] if args.key?(:description)
|
||||
end
|
||||
end
|
||||
|
||||
# A build resource in the Container Builder 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 what tag to
|
||||
# apply to the built image when it is pushed to Google Container Registry.
|
||||
# Fields can include the following variables which will be expanded when the
|
||||
# build is created:
|
||||
# - $PROJECT_ID: the project ID 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.
|
||||
class Build
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Time at which the request to create the build was received.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `createTime`
|
||||
# @return [String]
|
||||
attr_accessor :create_time
|
||||
|
||||
# Provenance of the source. Ways to find the original source, or verify that
|
||||
# some source was used for this build.
|
||||
# Corresponds to the JSON property `sourceProvenance`
|
||||
# @return [Google::Apis::CloudbuildV1::SourceProvenance]
|
||||
attr_accessor :source_provenance
|
||||
|
||||
# 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.
|
||||
# Corresponds to the JSON property `images`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :images
|
||||
|
||||
# ID of the project.
|
||||
# @OutputOnly.
|
||||
# Corresponds to the JSON property `projectId`
|
||||
# @return [String]
|
||||
attr_accessor :project_id
|
||||
|
||||
# URL to logs for this build in Google Cloud Logging.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `logUrl`
|
||||
# @return [String]
|
||||
attr_accessor :log_url
|
||||
|
||||
# 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.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `finishTime`
|
||||
# @return [String]
|
||||
attr_accessor :finish_time
|
||||
|
||||
# Source describes the location of the source in a supported storage
|
||||
# service.
|
||||
# Corresponds to the JSON property `source`
|
||||
# @return [Google::Apis::CloudbuildV1::Source]
|
||||
attr_accessor :source
|
||||
|
||||
# Optional arguments to enable specific features of builds.
|
||||
# Corresponds to the JSON property `options`
|
||||
# @return [Google::Apis::CloudbuildV1::BuildOptions]
|
||||
attr_accessor :options
|
||||
|
||||
# Customer-readable message about the current status.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `statusDetail`
|
||||
# @return [String]
|
||||
attr_accessor :status_detail
|
||||
|
||||
# Status of the build.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `status`
|
||||
# @return [String]
|
||||
attr_accessor :status
|
||||
|
||||
# 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.
|
||||
# Default time is ten minutes.
|
||||
# Corresponds to the JSON property `timeout`
|
||||
# @return [String]
|
||||
attr_accessor :timeout
|
||||
|
||||
# Results describes the artifacts created by the build pipeline.
|
||||
# Corresponds to the JSON property `results`
|
||||
# @return [Google::Apis::CloudbuildV1::Results]
|
||||
attr_accessor :results
|
||||
|
||||
# Google Cloud Storage bucket where logs should be written (see
|
||||
# [Bucket Name
|
||||
# Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)
|
||||
# ).
|
||||
# Logs file names will be of the format `$`logs_bucket`/log-$`build_id`.txt`.
|
||||
# Corresponds to the JSON property `logsBucket`
|
||||
# @return [String]
|
||||
attr_accessor :logs_bucket
|
||||
|
||||
# Describes the operations to be performed on the workspace.
|
||||
# Corresponds to the JSON property `steps`
|
||||
# @return [Array<Google::Apis::CloudbuildV1::BuildStep>]
|
||||
attr_accessor :steps
|
||||
|
||||
# The ID of the BuildTrigger that triggered this build, if it was
|
||||
# triggered automatically.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `buildTriggerId`
|
||||
# @return [String]
|
||||
attr_accessor :build_trigger_id
|
||||
|
||||
# Unique identifier of the build.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `id`
|
||||
# @return [String]
|
||||
attr_accessor :id
|
||||
|
||||
# Time at which execution of the build was started.
|
||||
# @OutputOnly
|
||||
# Corresponds to the JSON property `startTime`
|
||||
# @return [String]
|
||||
attr_accessor :start_time
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@create_time = args[:create_time] if args.key?(:create_time)
|
||||
@source_provenance = args[:source_provenance] if args.key?(:source_provenance)
|
||||
@images = args[:images] if args.key?(:images)
|
||||
@project_id = args[:project_id] if args.key?(:project_id)
|
||||
@log_url = args[:log_url] if args.key?(:log_url)
|
||||
@finish_time = args[:finish_time] if args.key?(:finish_time)
|
||||
@source = args[:source] if args.key?(:source)
|
||||
@options = args[:options] if args.key?(:options)
|
||||
@status_detail = args[:status_detail] if args.key?(:status_detail)
|
||||
@status = args[:status] if args.key?(:status)
|
||||
@timeout = args[:timeout] if args.key?(:timeout)
|
||||
@results = args[:results] if args.key?(:results)
|
||||
@logs_bucket = args[:logs_bucket] if args.key?(:logs_bucket)
|
||||
@steps = args[:steps] if args.key?(:steps)
|
||||
@build_trigger_id = args[:build_trigger_id] if args.key?(:build_trigger_id)
|
||||
@id = args[:id] if args.key?(:id)
|
||||
@start_time = args[:start_time] if args.key?(:start_time)
|
||||
end
|
||||
end
|
||||
|
||||
# Request to cancel an ongoing build.
|
||||
class CancelBuildRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user