Class: Google::Apis::ClouddeployV1::ContainerTask

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

Overview

This task is represented by a container that is executed in the Cloud Build execution environment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ContainerTask

Returns a new instance of ContainerTask.



1579
1580
1581
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 1579

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

Instance Attribute Details

#argsArray<String>

Optional. Args is the container arguments to use. This overrides the default arguments defined in the container image. Corresponds to the JSON property args

Returns:

  • (Array<String>)


1555
1556
1557
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 1555

def args
  @args
end

#commandArray<String>

Optional. Command is the container entrypoint to use. This overrides the default entrypoint defined in the container image. Corresponds to the JSON property command

Returns:

  • (Array<String>)


1561
1562
1563
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 1561

def command
  @command
end

#envHash<String,String>

Optional. Environment variables that are set in the container. Corresponds to the JSON property env

Returns:

  • (Hash<String,String>)


1566
1567
1568
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 1566

def env
  @env
end

#imageString

Required. Image is the container image to use. Corresponds to the JSON property image

Returns:

  • (String)


1571
1572
1573
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 1571

def image
  @image
end

#scriptString

Optional. Shell script to execute. If provided then command and args cannot be specified. Corresponds to the JSON property script

Returns:

  • (String)


1577
1578
1579
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 1577

def script
  @script
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1584
1585
1586
1587
1588
1589
1590
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 1584

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)
  @script = args[:script] if args.key?(:script)
end