Class: Google::Apis::CloudbuildV1::RepoSource

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

Location of the source in a Google Cloud Source Repository.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ RepoSource

Returns a new instance of RepoSource.



2154
2155
2156
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2154

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

Instance Attribute Details

#branch_nameString

Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/ google/re2/wiki/Syntax Corresponds to the JSON property branchName

Returns:

  • (String)


2110
2111
2112
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2110

def branch_name
  @branch_name
end

#commit_shaString

Explicit commit SHA to build. Corresponds to the JSON property commitSha

Returns:

  • (String)


2115
2116
2117
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2115

def commit_sha
  @commit_sha
end

#dirString

Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution. Corresponds to the JSON property dir

Returns:

  • (String)


2122
2123
2124
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2122

def dir
  @dir
end

#invert_regexBoolean Also known as: invert_regex?

Only trigger a build if the revision regex does NOT match the revision regex. Corresponds to the JSON property invertRegex

Returns:

  • (Boolean)


2127
2128
2129
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2127

def invert_regex
  @invert_regex
end

#project_idString

ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed. Corresponds to the JSON property projectId

Returns:

  • (String)


2134
2135
2136
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2134

def project_id
  @project_id
end

#repo_nameString

Name of the Cloud Source Repository. Corresponds to the JSON property repoName

Returns:

  • (String)


2139
2140
2141
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2139

def repo_name
  @repo_name
end

#substitutionsHash<String,String>

Substitutions to use in a triggered build. Should only be used with RunBuildTrigger Corresponds to the JSON property substitutions

Returns:

  • (Hash<String,String>)


2145
2146
2147
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2145

def substitutions
  @substitutions
end

#tag_nameString

Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/ wiki/Syntax Corresponds to the JSON property tagName

Returns:

  • (String)


2152
2153
2154
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2152

def tag_name
  @tag_name
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
# File 'lib/google/apis/cloudbuild_v1/classes.rb', line 2159

def update!(**args)
  @branch_name = args[:branch_name] if args.key?(:branch_name)
  @commit_sha = args[:commit_sha] if args.key?(:commit_sha)
  @dir = args[:dir] if args.key?(:dir)
  @invert_regex = args[:invert_regex] if args.key?(:invert_regex)
  @project_id = args[:project_id] if args.key?(:project_id)
  @repo_name = args[:repo_name] if args.key?(:repo_name)
  @substitutions = args[:substitutions] if args.key?(:substitutions)
  @tag_name = args[:tag_name] if args.key?(:tag_name)
end