-
Notifications
You must be signed in to change notification settings - Fork 0
Class.Job
@decentm/concourse-ts / Job
https://concourse-ci.org/jobs.html
new Job(
name
,customise
?):Job
Constructs a new Job
https://concourse-ci.org/jobs.html
• name: string
The name of the step. This will be visible in the Concourse UI.
• customise?
optional
build_log_retention:BuildLogRetentionPolicy
https://concourse-ci.org/jobs.html#schema.job.build_log_retention
optional
disable_manual_trigger:boolean
https://concourse-ci.org/jobs.html#schema.job.disable_manual_trigger
optional
interruptible:boolean
https://concourse-ci.org/jobs.html#schema.job.interruptible
optional
max_in_flight:number
https://concourse-ci.org/jobs.html#schema.job.max_in_flight
name:
string
The name of the step. This will be visible in the Concourse UI.
optional
old_name:string
https://concourse-ci.org/jobs.html#schema.job.old_name
public:
boolean
https://concourse-ci.org/jobs.html#schema.job.public
serial:
boolean
https://concourse-ci.org/jobs.html#schema.job.serial
add_ensure(
step
):void
Adds a step that will get executed all of the time, regardless of the exit status of previous steps. Useful for cleaning up state for example.
The real step added to this Job will always be a DoStep, with the passed step added onto it as the last Step.
https://concourse-ci.org/jobs.html#schema.job.ensure
• step: AnyStep
The Step to execute when this job finishes.
void
add_on_abort(
step
):void
Adds a step that will get executed if the job is aborted. Abort indicates that a user has manually cancelled the job (including API clients).
The real step added to this Job will always be a DoStep, with the passed step added onto it as the last Step.
https://concourse-ci.org/jobs.html#schema.job.on_abort
• step: AnyStep
The Step to execute when this job is aborted.
void
add_on_error(
step
):void
Adds a step that will get executed if any previous step fails. Error indicates a normal exit state, such as tests failing, or compilers crashing.
The real step added to this Job will always be a DoStep, with the passed step added onto it as the last Step.
https://concourse-ci.org/jobs.html#schema.job.on_error
• step: AnyStep
The Step to execute when this job errors.
void
add_on_failure(
step
):void
Adds a step that will get executed if any previous step fails. Failure indicates a non-normal exit state, such as the worker crashing, or losing connection.
The real step added to this Job will always be a DoStep, with the passed step added onto it as the last Step.
https://concourse-ci.org/jobs.html#schema.job.on_failure
• step: AnyStep
The Step to execute when this job fails.
void
add_on_success(
step
):void
Adds a step that will get executed if all previous steps succeed. The real step added to this Job will always be a DoStep, with the passed step added onto it as the last Step.
https://concourse-ci.org/jobs.html#schema.job.on_success
• step: AnyStep
The Step to execute when this job succeeds.
void
add_serial_group(
serial_group
):void
https://concourse-ci.org/jobs.html#schema.job.serial_groups
• serial_group: string
void
add_step(...
steps
):void
Adds one or more steps to the Job. They will be executed in the same order as they are passed.
• ...steps: AnyStep
[]
Steps to add to the Job in order.
void
add_step_first(...
steps
):void
Adds one or more steps before the current ones to the Job. They will be executed in the same order they're passed, but before other steps that exist on this Job.
• ...steps: AnyStep
[]
void
serialise():
Job
Serialises this Job into a valid Concourse configuration fixture. The returned value needs to be converted into YAML to be used in Concourse.
A JSON representation of this Job
static
customise(init
):void
Sets a customiser function onto all jobs created after this call. If a customiser already exists, it will be overwritten.
• init
Your customiser function. It receives a Job instance whenever a Job is constructed.
void