Skip to content

Class.TaskStep

DecentM edited this page Jan 16, 2026 · 86 revisions

@decentm/concourse-ts / TaskStep

Class: TaskStep<Input, Output>

Defined in: components/step/task.ts:17

Executes a task, which is the smallest configurable unit in a Concourse pipeline. A task can run any script in any container, with any inputs and outputs.

https://concourse-ci.org/docs/steps/task/

Extends

Type Parameters

Input extends Identifier = Identifier

Output extends Identifier = Identifier

Constructors

new TaskStep()

new TaskStep<Input, Output>(name, customise?): TaskStep<Input, Output>

Defined in: components/step/task.ts:34

Parameters

name

string

customise?

(instance) => void

Returns

TaskStep<Input, Output>

Overrides

Step<Type.TaskStep>.constructor

Properties

name

name: string

Defined in: components/step/task.ts:35

Inherited from

Step.name

Methods

add_across()

add_across(...across): void

Defined in: components/step/base.ts:57

https://concourse-ci.org/docs/steps/modifier-and-hooks/across/#across-step-modifier

Parameters

across

...Across<Identifier>[]

The modifier to add

Returns

void

Inherited from

Step.add_across


add_ensure()

add_ensure(step): void

Defined in: components/step/base.ts:249

Adds a step to always be run after this one.

https://concourse-ci.org/docs/steps/modifier-and-hooks/ensure/#ensure-step-hook

Parameters

step

AnyStep

Returns

void

Inherited from

Step.add_ensure


add_on_abort()

add_on_abort(step): void

Defined in: components/step/base.ts:234

Adds a step to be run after this one is aborted.

https://concourse-ci.org/docs/steps/modifier-and-hooks/on-abort/#on_abort-step-hook

Parameters

step

AnyStep

Returns

void

Inherited from

Step.add_on_abort


add_on_error()

add_on_error(step): void

Defined in: components/step/base.ts:219

Adds a step to be run after this one errors.

https://concourse-ci.org/docs/steps/modifier-and-hooks/on-error/#on_error-step-hook

Parameters

step

AnyStep

Returns

void

Inherited from

Step.add_on_error


add_on_failure()

add_on_failure(step): void

Defined in: components/step/base.ts:204

Adds a step to be run after this one fails.

https://concourse-ci.org/docs/steps/modifier-and-hooks/on-failure/#on_failure-step-hook

Parameters

step

AnyStep

Returns

void

Inherited from

Step.add_on_failure


add_on_success()

add_on_success(step): void

Defined in: components/step/base.ts:189

Adds a step to be run after this one succeeds.

https://concourse-ci.org/docs/steps/modifier-and-hooks/on-success/#on_success-step-hook

Parameters

step

AnyStep

Returns

void

Inherited from

Step.add_on_success


add_tags()

add_tags(...tags): void

Defined in: components/step/base.ts:174

https://concourse-ci.org/docs/steps/modifier-and-hooks/tags/#tags-step-modifier

Parameters

tags

...string[]

Returns

void

Inherited from

Step.add_tags


get_task()

get_task(): Task<Input, Output>

Defined in: components/step/task.ts:68

Returns the task configuration set on this step.

Returns

Task<Input, Output>

The task configuration, if set


set_attempts()

set_attempts(attempts): void

Defined in: components/step/base.ts:81

Sets the number of attempts for this step.

https://concourse-ci.org/docs/steps/modifier-and-hooks/attempts/#attempts-step-modifier

Parameters

attempts

number

Returns

void

Inherited from

Step.set_attempts


set_file()

set_file(file): void

Defined in: components/step/task.ts:82

Sets the path to an external task configuration file. When set, the task config is loaded from this file instead of inline config.

https://concourse-ci.org/docs/steps/task/#task-step

Parameters

file

string

Path to the task config file (e.g., "my-repo/ci/task.yml")

Returns

void


set_image()

set_image(image): void

Defined in: components/step/task.ts:96

Sets an artifact source containing an image to use for the task. Overrides the image specified in the task configuration.

https://concourse-ci.org/docs/steps/task/#task-step

Parameters

image

string

The name of the artifact containing the image

Returns

void


set_input_mapping()

set_input_mapping(input, mapped_input): void

Defined in: components/step/task.ts:162

Maps an artifact name to a different input name expected by the task. Useful when artifact names don't match what the task config expects.

https://concourse-ci.org/docs/steps/task/#task-step

Parameters

input

string

The artifact name available in the job

mapped_input

string

The input name expected by the task

Returns

void


set_output_mapping()

set_output_mapping(output, mapped_output): void

Defined in: components/step/task.ts:179

Maps a task output name to a different artifact name. Useful when the task outputs need to be renamed for downstream steps.

https://concourse-ci.org/docs/steps/task/#task-step

Parameters

output

string

The output name produced by the task

mapped_output

string

The artifact name to use in the job

Returns

void


set_params()

set_params(params): void

Defined in: components/step/task.ts:142

Sets environment variables to pass to the task. These override any parameters set in the task configuration.

https://concourse-ci.org/docs/steps/task/#task-step

Parameters

params

EnvVars

Environment variables to set

Returns

void


set_privileged()

set_privileged(): void

Defined in: components/step/task.ts:109

Sets "privileged" to true - avoid calling to keep false. Running a task with elevated privileges allows the container to have full access to the host machine.

https://concourse-ci.org/docs/steps/task/#task-step

Returns

void


set_task()

set_task(task): void

Defined in: components/step/task.ts:59

Sets the task configuration to run. The task defines what container image to use, what command to run, and what inputs/outputs are expected.

https://concourse-ci.org/docs/steps/task/#task-step

Parameters

task

Task<Input, Output>

The task configuration

Returns

void


set_timeout()

set_timeout(timeout): void

Defined in: components/step/base.ts:68

https://concourse-ci.org/docs/steps/modifier-and-hooks/timeout/#timeout-step-modifier

Parameters

timeout

DurationInput

Returns

void

Inherited from

Step.set_timeout


set_vars()

set_vars(vars): void

Defined in: components/step/task.ts:123

Sets template variables to pass to the task. These can be used for parameterising task configs loaded from files.

https://concourse-ci.org/docs/steps/task/#task-step

Parameters

vars

Vars

Key-value pairs for template variables

Returns

void


customise()

static customise(init): void

Defined in: components/step/task.ts:30

Customises all TaskSteps constructed after calling this function.

Type.Customiser

Parameters

init

(instance) => void

Returns

void


customise_base()

static customise_base(init): void

Defined in: components/step/base.ts:28

Customises the base of all Steps constructed after calling this function

Type.Customiser

Parameters

init

(instance) => void

Returns

void

Inherited from

Step.customise_base

Clone this wiki locally