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
|
||||
@@ -22,6 +22,30 @@ module Google
|
||||
module Apis
|
||||
module CloudbuildV1
|
||||
|
||||
class Empty
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class BuildTrigger
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Build
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CancelBuildRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ListBuildsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
@@ -125,27 +149,58 @@ module Google
|
||||
end
|
||||
|
||||
class Empty
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class BuildTrigger
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :id, as: 'id'
|
||||
property :build, as: 'build', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
property :description, as: 'description'
|
||||
property :disabled, as: 'disabled'
|
||||
property :create_time, as: 'createTime'
|
||||
property :filename, as: 'filename'
|
||||
property :trigger_template, as: 'triggerTemplate', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class Build
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :start_time, as: 'startTime'
|
||||
property :source_provenance, as: 'sourceProvenance', class: Google::Apis::CloudbuildV1::SourceProvenance, decorator: Google::Apis::CloudbuildV1::SourceProvenance::Representation
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
property :create_time, as: 'createTime'
|
||||
collection :images, as: 'images'
|
||||
property :project_id, as: 'projectId'
|
||||
property :log_url, as: 'logUrl'
|
||||
property :finish_time, as: 'finishTime'
|
||||
property :source, as: 'source', class: Google::Apis::CloudbuildV1::Source, decorator: Google::Apis::CloudbuildV1::Source::Representation
|
||||
|
||||
property :options, as: 'options', class: Google::Apis::CloudbuildV1::BuildOptions, decorator: Google::Apis::CloudbuildV1::BuildOptions::Representation
|
||||
|
||||
property :status_detail, as: 'statusDetail'
|
||||
property :status, as: 'status'
|
||||
property :timeout, as: 'timeout'
|
||||
property :logs_bucket, as: 'logsBucket'
|
||||
property :results, as: 'results', class: Google::Apis::CloudbuildV1::Results, decorator: Google::Apis::CloudbuildV1::Results::Representation
|
||||
|
||||
collection :steps, as: 'steps', class: Google::Apis::CloudbuildV1::BuildStep, decorator: Google::Apis::CloudbuildV1::BuildStep::Representation
|
||||
|
||||
property :build_trigger_id, as: 'buildTriggerId'
|
||||
property :id, as: 'id'
|
||||
end
|
||||
end
|
||||
|
||||
class CancelBuildRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class ListBuildsResponse
|
||||
@@ -196,9 +251,9 @@ module Google
|
||||
class Results
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :build_step_images, as: 'buildStepImages'
|
||||
collection :images, as: 'images', class: Google::Apis::CloudbuildV1::BuiltImage, decorator: Google::Apis::CloudbuildV1::BuiltImage::Representation
|
||||
|
||||
collection :build_step_images, as: 'buildStepImages'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -231,12 +286,12 @@ module Google
|
||||
class Operation
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :done, as: 'done'
|
||||
hash :response, as: 'response'
|
||||
property :name, as: 'name'
|
||||
property :error, as: 'error', class: Google::Apis::CloudbuildV1::Status, decorator: Google::Apis::CloudbuildV1::Status::Representation
|
||||
|
||||
hash :metadata, as: 'metadata'
|
||||
property :done, as: 'done'
|
||||
hash :response, as: 'response'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -259,24 +314,24 @@ module Google
|
||||
class BuildStep
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :name, as: 'name'
|
||||
property :entrypoint, as: 'entrypoint'
|
||||
property :id, as: 'id'
|
||||
property :dir, as: 'dir'
|
||||
collection :wait_for, as: 'waitFor'
|
||||
collection :env, as: 'env'
|
||||
collection :wait_for, as: 'waitFor'
|
||||
collection :args, as: 'args'
|
||||
property :name, as: 'name'
|
||||
property :entrypoint, as: 'entrypoint'
|
||||
end
|
||||
end
|
||||
|
||||
class RepoSource
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :tag_name, as: 'tagName'
|
||||
property :commit_sha, as: 'commitSha'
|
||||
property :project_id, as: 'projectId'
|
||||
property :repo_name, as: 'repoName'
|
||||
property :branch_name, as: 'branchName'
|
||||
property :tag_name, as: 'tagName'
|
||||
property :commit_sha, as: 'commitSha'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -304,61 +359,6 @@ module Google
|
||||
property :code, as: 'code'
|
||||
end
|
||||
end
|
||||
|
||||
class Empty
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class BuildTrigger
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :create_time, as: 'createTime'
|
||||
property :disabled, as: 'disabled'
|
||||
property :trigger_template, as: 'triggerTemplate', class: Google::Apis::CloudbuildV1::RepoSource, decorator: Google::Apis::CloudbuildV1::RepoSource::Representation
|
||||
|
||||
property :filename, as: 'filename'
|
||||
property :id, as: 'id'
|
||||
property :build, as: 'build', class: Google::Apis::CloudbuildV1::Build, decorator: Google::Apis::CloudbuildV1::Build::Representation
|
||||
|
||||
property :description, as: 'description'
|
||||
end
|
||||
end
|
||||
|
||||
class Build
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :create_time, as: 'createTime'
|
||||
property :source_provenance, as: 'sourceProvenance', class: Google::Apis::CloudbuildV1::SourceProvenance, decorator: Google::Apis::CloudbuildV1::SourceProvenance::Representation
|
||||
|
||||
collection :images, as: 'images'
|
||||
property :project_id, as: 'projectId'
|
||||
property :log_url, as: 'logUrl'
|
||||
property :finish_time, as: 'finishTime'
|
||||
property :source, as: 'source', class: Google::Apis::CloudbuildV1::Source, decorator: Google::Apis::CloudbuildV1::Source::Representation
|
||||
|
||||
property :options, as: 'options', class: Google::Apis::CloudbuildV1::BuildOptions, decorator: Google::Apis::CloudbuildV1::BuildOptions::Representation
|
||||
|
||||
property :status_detail, as: 'statusDetail'
|
||||
property :status, as: 'status'
|
||||
property :timeout, as: 'timeout'
|
||||
property :results, as: 'results', class: Google::Apis::CloudbuildV1::Results, decorator: Google::Apis::CloudbuildV1::Results::Representation
|
||||
|
||||
property :logs_bucket, as: 'logsBucket'
|
||||
collection :steps, as: 'steps', class: Google::Apis::CloudbuildV1::BuildStep, decorator: Google::Apis::CloudbuildV1::BuildStep::Representation
|
||||
|
||||
property :build_trigger_id, as: 'buildTriggerId'
|
||||
property :id, as: 'id'
|
||||
property :start_time, as: 'startTime'
|
||||
end
|
||||
end
|
||||
|
||||
class CancelBuildRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -46,6 +46,42 @@ module Google
|
||||
super('https://cloudbuild.googleapis.com/', '')
|
||||
end
|
||||
|
||||
# Starts a build with the specified configuration.
|
||||
# The long-running Operation returned by this method will include the ID of
|
||||
# the build, which can be passed to GetBuild to determine its status (e.g.,
|
||||
# success or failure).
|
||||
# @param [String] project_id
|
||||
# ID of the project.
|
||||
# @param [Google::Apis::CloudbuildV1::Build] build_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudbuildV1::Operation]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def create_project_build(project_id, build_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/projects/{projectId}/builds', options)
|
||||
command.request_representation = Google::Apis::CloudbuildV1::Build::Representation
|
||||
command.request_object = build_object
|
||||
command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
|
||||
command.response_class = Google::Apis::CloudbuildV1::Operation
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Cancels a requested build in progress.
|
||||
# @param [String] project_id
|
||||
# ID of the project.
|
||||
@@ -122,12 +158,12 @@ module Google
|
||||
# successfully or unsuccessfully.
|
||||
# @param [String] project_id
|
||||
# ID of the project.
|
||||
# @param [String] filter
|
||||
# The raw filter text to constrain the results.
|
||||
# @param [String] page_token
|
||||
# Token to provide to skip to a particular spot in the list.
|
||||
# @param [Fixnum] page_size
|
||||
# Number of results to return in the list.
|
||||
# @param [String] filter
|
||||
# The raw filter text to constrain the results.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
@@ -145,50 +181,14 @@ module Google
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_project_builds(project_id, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
def list_project_builds(project_id, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/projects/{projectId}/builds', options)
|
||||
command.response_representation = Google::Apis::CloudbuildV1::ListBuildsResponse::Representation
|
||||
command.response_class = Google::Apis::CloudbuildV1::ListBuildsResponse
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Starts a build with the specified configuration.
|
||||
# The long-running Operation returned by this method will include the ID of
|
||||
# the build, which can be passed to GetBuild to determine its status (e.g.,
|
||||
# success or failure).
|
||||
# @param [String] project_id
|
||||
# ID of the project.
|
||||
# @param [Google::Apis::CloudbuildV1::Build] build_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudbuildV1::Operation]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def create_project_build(project_id, build_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/projects/{projectId}/builds', options)
|
||||
command.request_representation = Google::Apis::CloudbuildV1::Build::Representation
|
||||
command.request_object = build_object
|
||||
command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
|
||||
command.response_class = Google::Apis::CloudbuildV1::Operation
|
||||
command.params['projectId'] = project_id unless project_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
@@ -364,6 +364,80 @@ module Google
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists operations that match the specified filter in the request. If the
|
||||
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
||||
# NOTE: the `name` binding below allows API services to override the binding
|
||||
# to use different resource name schemes, such as `users/*/operations`.
|
||||
# @param [String] name
|
||||
# The name of the operation collection.
|
||||
# @param [String] page_token
|
||||
# The standard list page token.
|
||||
# @param [Fixnum] page_size
|
||||
# The standard list page size.
|
||||
# @param [String] filter
|
||||
# The standard list filter.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudbuildV1::ListOperationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudbuildV1::ListOperationsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_operations(name, page_token: nil, page_size: nil, filter: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::CloudbuildV1::ListOperationsResponse::Representation
|
||||
command.response_class = Google::Apis::CloudbuildV1::ListOperationsResponse
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the latest state of a long-running operation. Clients can use this
|
||||
# method to poll the operation result at intervals as recommended by the API
|
||||
# service.
|
||||
# @param [String] name
|
||||
# The name of the operation resource.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudbuildV1::Operation]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
|
||||
command.response_class = Google::Apis::CloudbuildV1::Operation
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Starts asynchronous cancellation on a long-running operation. The server
|
||||
# makes a best effort to cancel the operation, but success is not
|
||||
# guaranteed. If the server doesn't support this method, it returns
|
||||
@@ -405,80 +479,6 @@ module Google
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists operations that match the specified filter in the request. If the
|
||||
# server doesn't support this method, it returns `UNIMPLEMENTED`.
|
||||
# NOTE: the `name` binding below allows API services to override the binding
|
||||
# to use different resource name schemes, such as `users/*/operations`.
|
||||
# @param [String] name
|
||||
# The name of the operation collection.
|
||||
# @param [String] filter
|
||||
# The standard list filter.
|
||||
# @param [String] page_token
|
||||
# The standard list page token.
|
||||
# @param [Fixnum] page_size
|
||||
# The standard list page size.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudbuildV1::ListOperationsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudbuildV1::ListOperationsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def list_operations(name, filter: nil, page_token: nil, page_size: nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::CloudbuildV1::ListOperationsResponse::Representation
|
||||
command.response_class = Google::Apis::CloudbuildV1::ListOperationsResponse
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['filter'] = filter unless filter.nil?
|
||||
command.query['pageToken'] = page_token unless page_token.nil?
|
||||
command.query['pageSize'] = page_size unless page_size.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the latest state of a long-running operation. Clients can use this
|
||||
# method to poll the operation result at intervals as recommended by the API
|
||||
# service.
|
||||
# @param [String] name
|
||||
# The name of the operation resource.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::CloudbuildV1::Operation] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::CloudbuildV1::Operation]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_operation(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::CloudbuildV1::Operation::Representation
|
||||
command.response_class = Google::Apis::CloudbuildV1::Operation
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
|
||||
Reference in new issue
Block a user