Class: Jobs

Jobs


new Jobs()

Methods


cancel(projectId, jobId)

Cancel a single job of a project

Parameters:
Name Type Description
projectId integer | string

The ID or URL-encoded path of the project owned by the authenticated user

jobId integer

The ID of a job


downloadArtifactFile(projectId, jobId, artifactPath)

Download a single artifact file from within the job's artifacts archive.

Parameters:
Name Type Description
projectId integer | string

The ID or URL-encoded path of the project owned by the authenticated user

jobId integer

The ID of a job

artifactPath string

Path to a file inside the artifacts archive


pipeline(projectId, pipelineId [, scope])

Get a list of jobs for a pipeline.

Parameters:
Name Type Argument Description
projectId integer | string

The ID or URL-encoded path of the project owned by the authenticated user

pipelineId integer

The ID of a pipeline

scope string | array <optional>

The scope of jobs to show, one or array of: created, pending, running, failed, success, canceled, skipped, manual; showing all jobs if none provided


play(projectId, jobId)

Triggers a manual action to start a job.

Parameters:
Name Type Description
projectId integer | string

The ID or URL-encoded path of the project owned by the authenticated user

jobId integer

The ID of a job


project(projectId [, scope])

Get a list of jobs in a project.

Parameters:
Name Type Argument Description
projectId integer | string

The ID or URL-encoded path of the project owned by the authenticated user

scope string | array <optional>

The scope of jobs to show, one or array of: created, pending, running, failed, success, canceled, skipped, manual; showing all jobs if none provided


query(projectId, jobId)

Get a single job of a project

Parameters:
Name Type Description
projectId integer | string

The ID or URL-encoded path of the project owned by the authenticated user

jobId integer

The ID of a job


trace(projectId, jobId)

Get a trace of a specific job of a project

Parameters:
Name Type Description
projectId integer | string

The ID or URL-encoded path of the project owned by the authenticated user

jobId integer

The ID of a job