Class: Google::Cloud::Functions::V2::BuildConfig
- Inherits:
-
Object
- Object
- Google::Cloud::Functions::V2::BuildConfig
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/functions/v2/functions.rb
Overview
Describes the Build step of the function that builds a container from the given source.
Defined Under Namespace
Modules: DockerRegistry Classes: EnvironmentVariablesEntry
Instance Attribute Summary collapse
- #automatic_update_policy ⇒ ::Google::Cloud::Functions::V2::AutomaticUpdatePolicy
-
#build ⇒ ::String
readonly
Output only.
-
#docker_registry ⇒ ::Google::Cloud::Functions::V2::BuildConfig::DockerRegistry
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 ⇒ ::Google::Protobuf::Map{::String => ::String}
User-provided build-time environment variables for the function.
- #on_deploy_update_policy ⇒ ::Google::Cloud::Functions::V2::OnDeployUpdatePolicy
-
#runtime ⇒ ::String
The runtime in which to run the function.
-
#service_account ⇒ ::String
Service account to be used for building the container.
-
#source ⇒ ::Google::Cloud::Functions::V2::Source
The location of the function source code.
-
#source_provenance ⇒ ::Google::Cloud::Functions::V2::SourceProvenance
readonly
Output only.
-
#worker_pool ⇒ ::String
Name of the Cloud Build Custom Worker Pool that should be used to build the function.
Instance Attribute Details
#automatic_update_policy ⇒ ::Google::Cloud::Functions::V2::AutomaticUpdatePolicy
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 320 class BuildConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentVariablesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Docker Registry to use for storing function Docker images. module DockerRegistry # Unspecified. DOCKER_REGISTRY_UNSPECIFIED = 0 # Docker images will be stored in multi-regional Container Registry # repositories named `gcf`. CONTAINER_REGISTRY = 1 # Docker images will be stored in regional Artifact Registry repositories. # By default, GCF will create and use repositories named `gcf-artifacts` # in every region in which a function is deployed. But the repository to # use can also be specified by the user using the `docker_repository` # field. ARTIFACT_REGISTRY = 2 end end |
#build ⇒ ::String (readonly)
Returns Output only. The Cloud Build name of the latest successful deployment of the function.
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 320 class BuildConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentVariablesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Docker Registry to use for storing function Docker images. module DockerRegistry # Unspecified. DOCKER_REGISTRY_UNSPECIFIED = 0 # Docker images will be stored in multi-regional Container Registry # repositories named `gcf`. CONTAINER_REGISTRY = 1 # Docker images will be stored in regional Artifact Registry repositories. # By default, GCF will create and use repositories named `gcf-artifacts` # in every region in which a function is deployed. But the repository to # use can also be specified by the user using the `docker_repository` # field. ARTIFACT_REGISTRY = 2 end end |
#docker_registry ⇒ ::Google::Cloud::Functions::V2::BuildConfig::DockerRegistry
Returns 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
.
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 320 class BuildConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentVariablesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Docker Registry to use for storing function Docker images. module DockerRegistry # Unspecified. DOCKER_REGISTRY_UNSPECIFIED = 0 # Docker images will be stored in multi-regional Container Registry # repositories named `gcf`. CONTAINER_REGISTRY = 1 # Docker images will be stored in regional Artifact Registry repositories. # By default, GCF will create and use repositories named `gcf-artifacts` # in every region in which a function is deployed. But the repository to # use can also be specified by the user using the `docker_repository` # field. ARTIFACT_REGISTRY = 2 end end |
#docker_repository ⇒ ::String
Returns 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'.
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 320 class BuildConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentVariablesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Docker Registry to use for storing function Docker images. module DockerRegistry # Unspecified. DOCKER_REGISTRY_UNSPECIFIED = 0 # Docker images will be stored in multi-regional Container Registry # repositories named `gcf`. CONTAINER_REGISTRY = 1 # Docker images will be stored in regional Artifact Registry repositories. # By default, GCF will create and use repositories named `gcf-artifacts` # in every region in which a function is deployed. But the repository to # use can also be specified by the user using the `docker_repository` # field. ARTIFACT_REGISTRY = 2 end end |
#entry_point ⇒ ::String
Returns 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
.
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 320 class BuildConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentVariablesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Docker Registry to use for storing function Docker images. module DockerRegistry # Unspecified. DOCKER_REGISTRY_UNSPECIFIED = 0 # Docker images will be stored in multi-regional Container Registry # repositories named `gcf`. CONTAINER_REGISTRY = 1 # Docker images will be stored in regional Artifact Registry repositories. # By default, GCF will create and use repositories named `gcf-artifacts` # in every region in which a function is deployed. But the repository to # use can also be specified by the user using the `docker_repository` # field. ARTIFACT_REGISTRY = 2 end end |
#environment_variables ⇒ ::Google::Protobuf::Map{::String => ::String}
Returns User-provided build-time environment variables for the function.
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 320 class BuildConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentVariablesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Docker Registry to use for storing function Docker images. module DockerRegistry # Unspecified. DOCKER_REGISTRY_UNSPECIFIED = 0 # Docker images will be stored in multi-regional Container Registry # repositories named `gcf`. CONTAINER_REGISTRY = 1 # Docker images will be stored in regional Artifact Registry repositories. # By default, GCF will create and use repositories named `gcf-artifacts` # in every region in which a function is deployed. But the repository to # use can also be specified by the user using the `docker_repository` # field. ARTIFACT_REGISTRY = 2 end end |
#on_deploy_update_policy ⇒ ::Google::Cloud::Functions::V2::OnDeployUpdatePolicy
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 320 class BuildConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentVariablesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Docker Registry to use for storing function Docker images. module DockerRegistry # Unspecified. DOCKER_REGISTRY_UNSPECIFIED = 0 # Docker images will be stored in multi-regional Container Registry # repositories named `gcf`. CONTAINER_REGISTRY = 1 # Docker images will be stored in regional Artifact Registry repositories. # By default, GCF will create and use repositories named `gcf-artifacts` # in every region in which a function is deployed. But the repository to # use can also be specified by the user using the `docker_repository` # field. ARTIFACT_REGISTRY = 2 end end |
#runtime ⇒ ::String
Returns 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.
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 320 class BuildConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentVariablesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Docker Registry to use for storing function Docker images. module DockerRegistry # Unspecified. DOCKER_REGISTRY_UNSPECIFIED = 0 # Docker images will be stored in multi-regional Container Registry # repositories named `gcf`. CONTAINER_REGISTRY = 1 # Docker images will be stored in regional Artifact Registry repositories. # By default, GCF will create and use repositories named `gcf-artifacts` # in every region in which a function is deployed. But the repository to # use can also be specified by the user using the `docker_repository` # field. ARTIFACT_REGISTRY = 2 end end |
#service_account ⇒ ::String
Returns Service account to be used for building the container. The format of this
field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}
.
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 320 class BuildConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentVariablesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Docker Registry to use for storing function Docker images. module DockerRegistry # Unspecified. DOCKER_REGISTRY_UNSPECIFIED = 0 # Docker images will be stored in multi-regional Container Registry # repositories named `gcf`. CONTAINER_REGISTRY = 1 # Docker images will be stored in regional Artifact Registry repositories. # By default, GCF will create and use repositories named `gcf-artifacts` # in every region in which a function is deployed. But the repository to # use can also be specified by the user using the `docker_repository` # field. ARTIFACT_REGISTRY = 2 end end |
#source ⇒ ::Google::Cloud::Functions::V2::Source
Returns The location of the function source code.
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 320 class BuildConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentVariablesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Docker Registry to use for storing function Docker images. module DockerRegistry # Unspecified. DOCKER_REGISTRY_UNSPECIFIED = 0 # Docker images will be stored in multi-regional Container Registry # repositories named `gcf`. CONTAINER_REGISTRY = 1 # Docker images will be stored in regional Artifact Registry repositories. # By default, GCF will create and use repositories named `gcf-artifacts` # in every region in which a function is deployed. But the repository to # use can also be specified by the user using the `docker_repository` # field. ARTIFACT_REGISTRY = 2 end end |
#source_provenance ⇒ ::Google::Cloud::Functions::V2::SourceProvenance (readonly)
Returns Output only. A permanent fixed identifier for source.
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 320 class BuildConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentVariablesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Docker Registry to use for storing function Docker images. module DockerRegistry # Unspecified. DOCKER_REGISTRY_UNSPECIFIED = 0 # Docker images will be stored in multi-regional Container Registry # repositories named `gcf`. CONTAINER_REGISTRY = 1 # Docker images will be stored in regional Artifact Registry repositories. # By default, GCF will create and use repositories named `gcf-artifacts` # in every region in which a function is deployed. But the repository to # use can also be specified by the user using the `docker_repository` # field. ARTIFACT_REGISTRY = 2 end end |
#worker_pool ⇒ ::String
Returns 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
{project} and {region} are the project id and region respectively where the
worker pool is defined and {workerPool} is 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-
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 320 class BuildConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class EnvironmentVariablesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Docker Registry to use for storing function Docker images. module DockerRegistry # Unspecified. DOCKER_REGISTRY_UNSPECIFIED = 0 # Docker images will be stored in multi-regional Container Registry # repositories named `gcf`. CONTAINER_REGISTRY = 1 # Docker images will be stored in regional Artifact Registry repositories. # By default, GCF will create and use repositories named `gcf-artifacts` # in every region in which a function is deployed. But the repository to # use can also be specified by the user using the `docker_repository` # field. ARTIFACT_REGISTRY = 2 end end |