Class: Google::Cloud::Functions::V2::BuildConfig

Inherits:
Object
  • Object
show all
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

Instance Attribute Details

#build::String (readonly)

Returns Output only. The Cloud Build name of the latest successful deployment of the function.

Returns:

  • (::String)

    Output only. The Cloud Build name of the latest successful deployment of the function.



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 292

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 docker_repository field is specified, this field will be automatically set as ARTIFACT_REGISTRY. If unspecified, it currently defaults to CONTAINER_REGISTRY. This field may be overridden by the backend for eligible deployments.

Returns:

  • (::Google::Cloud::Functions::V2::BuildConfig::DockerRegistry)

    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 docker_repository field is specified, this field will be automatically set as ARTIFACT_REGISTRY. If unspecified, it currently defaults to CONTAINER_REGISTRY. This field may be overridden by the backend for eligible deployments.



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 292

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 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'.

Returns:

  • (::String)

    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'.



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 292

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.

Returns:

  • (::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.



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 292

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.

Returns:

  • (::Google::Protobuf::Map{::String => ::String})

    User-provided build-time environment variables for the function



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 292

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.

Returns:

  • (::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.



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 292

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.

Returns:



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 292

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.

Returns:



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 292

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-@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder (roles/cloudbuild.customworkers.builder) in the project.

Returns:

  • (::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 {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-@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder (roles/cloudbuild.customworkers.builder) in the project.



292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'proto_docs/google/cloud/functions/v2/functions.rb', line 292

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