Class: Google::Apis::CloudbuildV1::GoModule

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudbuild_v1/classes.rb,
lib/google/apis/cloudbuild_v1/representations.rb,
lib/google/apis/cloudbuild_v1/representations.rb

Overview

Go module to upload to Artifact Registry upon successful completion of all build steps. A module refers to all dependencies in a go.mod file.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoModule

Returns a new instance of GoModule.



2930
2931
2932
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2930

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#module_pathString

Optional. The Go module's "module path". e.g. example.com/foo/v2 Corresponds to the JSON property modulePath

Returns:

  • (String)


2895
2896
2897
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2895

def module_path
  @module_path
end

#module_versionString

Optional. The Go module's semantic version in the form vX.Y.Z. e.g. v0.1.1 Pre- release identifiers can also be added by appending a dash and dot separated ASCII alphanumeric characters and hyphens. e.g. v0.2.3-alpha.x.12m.5 Corresponds to the JSON property moduleVersion

Returns:

  • (String)


2902
2903
2904
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2902

def module_version
  @module_version
end

#repository_locationString

Optional. Location of the Artifact Registry repository. i.e. us-east1 Defaults to the build’s location. Corresponds to the JSON property repositoryLocation

Returns:

  • (String)


2908
2909
2910
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2908

def repository_location
  @repository_location
end

#repository_nameString

Optional. Artifact Registry repository name. Specified Go modules will be zipped and uploaded to Artifact Registry with this location as a prefix. e.g. my-go-repo Corresponds to the JSON property repositoryName

Returns:

  • (String)


2915
2916
2917
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2915

def repository_name
  @repository_name
end

#repository_project_idString

Optional. Project ID of the Artifact Registry repository. Defaults to the build project. Corresponds to the JSON property repositoryProjectId

Returns:

  • (String)


2921
2922
2923
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2921

def repository_project_id
  @repository_project_id
end

#source_pathString

Optional. Source path of the go.mod file in the build's workspace. If not specified, this will default to the current directory. e.g. ~/code/go/ mypackage Corresponds to the JSON property sourcePath

Returns:

  • (String)


2928
2929
2930
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2928

def source_path
  @source_path
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2935
2936
2937
2938
2939
2940
2941
2942
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2935

def update!(**args)
  @module_path = args[:module_path] if args.key?(:module_path)
  @module_version = args[:module_version] if args.key?(:module_version)
  @repository_location = args[:repository_location] if args.key?(:repository_location)
  @repository_name = args[:repository_name] if args.key?(:repository_name)
  @repository_project_id = args[:repository_project_id] if args.key?(:repository_project_id)
  @source_path = args[:source_path] if args.key?(:source_path)
end