Class: Google::Apis::CloudfunctionsV2alpha::BuildConfig
- Inherits:
-
Object
- Object
- Google::Apis::CloudfunctionsV2alpha::BuildConfig
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudfunctions_v2alpha/classes.rb,
lib/google/apis/cloudfunctions_v2alpha/representations.rb,
lib/google/apis/cloudfunctions_v2alpha/representations.rb
Overview
Describes the Build step of the function that builds a container from the given source.
Instance Attribute Summary collapse
-
#build ⇒ String
Output only.
-
#docker_repository ⇒ String
Optional.
-
#entry_point ⇒ String
The name of the function (as defined in source code) that will be executed.
-
#environment_variables ⇒ Hash<String,String>
User-provided build-time environment variables for the function Corresponds to the JSON property
environmentVariables
. -
#runtime ⇒ String
The runtime in which to run the function.
-
#source ⇒ Google::Apis::CloudfunctionsV2alpha::Source
The location of the function source code.
-
#source_provenance ⇒ Google::Apis::CloudfunctionsV2alpha::SourceProvenance
Provenance of the source.
-
#worker_pool ⇒ String
Name of the Cloud Build Custom Worker Pool that should be used to build the function.
Instance Method Summary collapse
-
#initialize(**args) ⇒ BuildConfig
constructor
A new instance of BuildConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ BuildConfig
Returns a new instance of BuildConfig.
238 239 240 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 238 def initialize(**args) update!(**args) end |
Instance Attribute Details
#build ⇒ String
Output only. The Cloud Build name of the latest successful deployment of the
function.
Corresponds to the JSON property build
179 180 181 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 179 def build @build end |
#docker_repository ⇒ String
Optional. User managed repository created in Artifact Registry optionally with
a customer managed encryption key. This is the repository to which the
function docker image will be pushed after it is built by Cloud Build. If
unspecified, GCF will create and use a repository named 'gcf-artifacts' for
every deployed region. It must match the pattern projects/
project/locations/
location/repositories/
repository`. Cross-project repositories are not
supported. Cross-location repositories are not supported. Repository format
must be 'DOCKER'.
Corresponds to the JSON property
dockerRepository`
191 192 193 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 191 def docker_repository @docker_repository end |
#entry_point ⇒ String
The name of the function (as defined in source code) that will be executed.
Defaults to the resource name suffix, if not specified. For backward
compatibility, if function with given name is not found, then the system will
try to use function named "function". For Node.js this is name of a function
exported by the module specified in source_location
.
Corresponds to the JSON property entryPoint
200 201 202 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 200 def entry_point @entry_point end |
#environment_variables ⇒ Hash<String,String>
User-provided build-time environment variables for the function
Corresponds to the JSON property environmentVariables
205 206 207 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 205 def environment_variables @environment_variables end |
#runtime ⇒ String
The runtime in which to run the function. Required when deploying a new
function, optional when updating an existing function. For a complete list of
possible choices, see the gcloud
command reference.
Corresponds to the JSON property runtime
213 214 215 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 213 def runtime @runtime end |
#source ⇒ Google::Apis::CloudfunctionsV2alpha::Source
The location of the function source code.
Corresponds to the JSON property source
218 219 220 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 218 def source @source end |
#source_provenance ⇒ Google::Apis::CloudfunctionsV2alpha::SourceProvenance
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
224 225 226 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 224 def source_provenance @source_provenance end |
#worker_pool ⇒ String
Name of the Cloud Build Custom Worker Pool that should be used to build the
function. The format of this field is projects/
project/locations/
region/
workerPools/
workerPool`where
projectand
regionare the project id and
region respectively where the worker pool is defined and
workerPoolis the
short name of the worker pool. If the project id is not the same as the
function, then the Cloud Functions Service Agent (service-@gcf-admin-robot.iam.
gserviceaccount.com) must be granted the role Cloud Build Custom Workers
Builder (roles/cloudbuild.customworkers.builder) in the project.
Corresponds to the JSON property
workerPool`
236 237 238 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 236 def worker_pool @worker_pool end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
243 244 245 246 247 248 249 250 251 252 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 243 def update!(**args) @build = args[:build] if args.key?(:build) @docker_repository = args[:docker_repository] if args.key?(:docker_repository) @entry_point = args[:entry_point] if args.key?(:entry_point) @environment_variables = args[:environment_variables] if args.key?(:environment_variables) @runtime = args[:runtime] if args.key?(:runtime) @source = args[:source] if args.key?(:source) @source_provenance = args[:source_provenance] if args.key?(:source_provenance) @worker_pool = args[:worker_pool] if args.key?(:worker_pool) end |