TaskSpec class

Spec of a task

Constructors

TaskSpec({Input<ComputeResource>? computeResource, Input<Environment>? environment, Input<Map<String, String>>? environments, Input<List<LifecyclePolicy>>? lifecyclePolicies, Input<int>? maxRetryCount, Input<String>? maxRunDuration, Input<List<Runnable>>? runnables, Input<List<Volume>>? volumes})
Creates a new TaskSpec. computeResource ComputeResource requirements. environment Environment variables to set before running the Task. environments Deprecated: please use environment(non-plural) instead. lifecyclePolicies Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count. maxRetryCount Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is 0, 10. maxRunDuration Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit. runnables The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures. volumes Volumes to mount before running Tasks using this TaskSpec.
const
TaskSpec.fromMap(Map<String, dynamic> map)
factory

Properties

computeResource → Input<ComputeResource>?
ComputeResource requirements.
final
environment → Input<Environment>?
Environment variables to set before running the Task.
final
environments → Input<Map<String, String>>?
Deprecated: please use environment(non-plural) instead.
final
hashCode → int
The hash code for this object.
no setterinherited
lifecyclePolicies → Input<List<LifecyclePolicy>>?
Lifecycle management schema when any task in a task group is failed. Currently we only support one lifecycle policy. When the lifecycle policy condition is met, the action in the policy will execute. If task execution result does not meet with the defined lifecycle policy, we consider it as the default policy. Default policy means if the exit code is 0, exit task. If task ends with non-zero exit code, retry the task with max_retry_count.
final
maxRetryCount → Input<int>?
Maximum number of retries on failures. The default, 0, which means never retry. The valid value range is 0, 10.
final
maxRunDuration → Input<String>?
Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit.
final
runnables → Input<List<Runnable>>?
The sequence of scripts or containers to run for this Task. Each Task using this TaskSpec executes its list of runnables in order. The Task succeeds if all of its runnables either exit with a zero status or any that exit with a non-zero status have the ignore_exit_status flag. Background runnables are killed automatically (if they have not already exited) a short time after all foreground runnables have completed. Even though this is likely to result in a non-zero exit status for the background runnable, these automatic kills are not treated as Task failures.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
volumes → Input<List<Volume>>?
Volumes to mount before running Tasks using this TaskSpec.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited