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
-
#automatic_update_policy ⇒ Google::Apis::CloudfunctionsV2alpha::AutomaticUpdatePolicy
Security patches are applied automatically to the runtime without requiring the function to be redeployed.
-
#build ⇒ String
Output only.
-
#docker_registry ⇒ String
Docker Registry to use for this deployment.
-
#docker_repository ⇒ String
Repository in Artifact Registry to which the function docker image will be pushed after it is built by Cloud Build.
-
#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
. -
#on_deploy_update_policy ⇒ Google::Apis::CloudfunctionsV2alpha::OnDeployUpdatePolicy
Security patches are only applied when a function is redeployed.
-
#runtime ⇒ String
The runtime in which to run the function.
-
#service_account ⇒ String
[Preview] Service account to be used for building the container Corresponds to the JSON property
serviceAccount
. -
#source ⇒ Google::Apis::CloudfunctionsV2alpha::Source
The location of the function source code.
-
#source_provenance ⇒ Google::Apis::CloudfunctionsV2alpha::SourceProvenance
Provenance of the source.
-
#source_token ⇒ String
An identifier for Firebase function sources.
-
#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.
323 324 325 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 323 def initialize(**args) update!(**args) end |
Instance Attribute Details
#automatic_update_policy ⇒ Google::Apis::CloudfunctionsV2alpha::AutomaticUpdatePolicy
Security patches are applied automatically to the runtime without requiring
the function to be redeployed.
Corresponds to the JSON property automaticUpdatePolicy
233 234 235 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 233 def automatic_update_policy @automatic_update_policy end |
#build ⇒ String
Output only. The Cloud Build name of the latest successful deployment of the
function.
Corresponds to the JSON property build
239 240 241 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 239 def build @build end |
#docker_registry ⇒ String
Docker Registry to use for this deployment. This configuration is only
applicable to 1st Gen functions, 2nd Gen functions can only use Artifact
Registry. If unspecified, it defaults to ARTIFACT_REGISTRY
. If
docker_repository
field is specified, this field should either be left
unspecified or set to ARTIFACT_REGISTRY
.
Corresponds to the JSON property dockerRegistry
248 249 250 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 248 def docker_registry @docker_registry end |
#docker_repository ⇒ String
Repository in Artifact Registry to which the function docker image will be
pushed after it is built by Cloud Build. If specified by user, it is created
and managed by user with a customer managed encryption key. Otherwise, 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`
260 261 262 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 260 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
269 270 271 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 269 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
274 275 276 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 274 def environment_variables @environment_variables end |
#on_deploy_update_policy ⇒ Google::Apis::CloudfunctionsV2alpha::OnDeployUpdatePolicy
Security patches are only applied when a function is redeployed.
Corresponds to the JSON property onDeployUpdatePolicy
279 280 281 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 279 def on_deploy_update_policy @on_deploy_update_policy 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
287 288 289 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 287 def runtime @runtime end |
#service_account ⇒ String
[Preview] Service account to be used for building the container
Corresponds to the JSON property serviceAccount
292 293 294 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 292 def service_account @service_account end |
#source ⇒ Google::Apis::CloudfunctionsV2alpha::Source
The location of the function source code.
Corresponds to the JSON property source
297 298 299 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 297 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
303 304 305 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 303 def source_provenance @source_provenance end |
#source_token ⇒ String
An identifier for Firebase function sources. Disclaimer: This field is only
supported for Firebase function deployments.
Corresponds to the JSON property sourceToken
309 310 311 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 309 def source_token @source_token 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`
321 322 323 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 321 def worker_pool @worker_pool end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 |
# File 'lib/google/apis/cloudfunctions_v2alpha/classes.rb', line 328 def update!(**args) @automatic_update_policy = args[:automatic_update_policy] if args.key?(:automatic_update_policy) @build = args[:build] if args.key?(:build) @docker_registry = args[:docker_registry] if args.key?(:docker_registry) @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) @on_deploy_update_policy = args[:on_deploy_update_policy] if args.key?(:on_deploy_update_policy) @runtime = args[:runtime] if args.key?(:runtime) @service_account = args[:service_account] if args.key?(:service_account) @source = args[:source] if args.key?(:source) @source_provenance = args[:source_provenance] if args.key?(:source_provenance) @source_token = args[:source_token] if args.key?(:source_token) @worker_pool = args[:worker_pool] if args.key?(:worker_pool) end |