Class: Google::Apis::CloudbuildV2::Step

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

Overview

Step embeds the Container type, which allows it to include fields not provided by Container.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Step

Returns a new instance of Step.



2405
2406
2407
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2405

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

Instance Attribute Details

#argsArray<String>

Arguments to the entrypoint. Corresponds to the JSON property args

Returns:

  • (Array<String>)


2358
2359
2360
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2358

def args
  @args
end

#commandArray<String>

Entrypoint array. Corresponds to the JSON property command

Returns:

  • (Array<String>)


2363
2364
2365
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2363

def command
  @command
end

#envArray<Google::Apis::CloudbuildV2::EnvVar>

List of environment variables to set in the container. Corresponds to the JSON property env



2368
2369
2370
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2368

def env
  @env
end

#imageString

Docker image name. Corresponds to the JSON property image

Returns:

  • (String)


2373
2374
2375
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2373

def image
  @image
end

#nameString

Name of the container specified as a DNS_LABEL. Corresponds to the JSON property name

Returns:

  • (String)


2378
2379
2380
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2378

def name
  @name
end

#scriptString

The contents of an executable file to execute. Corresponds to the JSON property script

Returns:

  • (String)


2383
2384
2385
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2383

def script
  @script
end

#security_contextGoogle::Apis::CloudbuildV2::SecurityContext

Security options the container should be run with. Corresponds to the JSON property securityContext



2388
2389
2390
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2388

def security_context
  @security_context
end

#timeoutString

Time after which the Step times out. Defaults to never. Corresponds to the JSON property timeout

Returns:

  • (String)


2393
2394
2395
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2393

def timeout
  @timeout
end

#volume_mountsArray<Google::Apis::CloudbuildV2::VolumeMount>

Pod volumes to mount into the container's filesystem. Corresponds to the JSON property volumeMounts



2398
2399
2400
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2398

def volume_mounts
  @volume_mounts
end

#working_dirString

Container's working directory. Corresponds to the JSON property workingDir

Returns:

  • (String)


2403
2404
2405
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2403

def working_dir
  @working_dir
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
# File 'lib/google/apis/cloudbuild_v2/classes.rb', line 2410

def update!(**args)
  @args = args[:args] if args.key?(:args)
  @command = args[:command] if args.key?(:command)
  @env = args[:env] if args.key?(:env)
  @image = args[:image] if args.key?(:image)
  @name = args[:name] if args.key?(:name)
  @script = args[:script] if args.key?(:script)
  @security_context = args[:security_context] if args.key?(:security_context)
  @timeout = args[:timeout] if args.key?(:timeout)
  @volume_mounts = args[:volume_mounts] if args.key?(:volume_mounts)
  @working_dir = args[:working_dir] if args.key?(:working_dir)
end