Options
All
  • Public
  • Public/Protected
  • All
Menu

Jobs define a collection of steps to be run within a given executor, and are orchestrated using Workflows.

Hierarchy

Implements

Index

Constructors

Properties

environment?: EnvironmentParameter

A map of environment variable names and values.

executor: AnyExecutor

The reusable executor to use for this job. The Executor must have already been instantiated and added to the config.

name: string

The name of the current Job.

parallelism: undefined | number

Number of parallel instances of this job to run (defaults to 1 if undefined)

shell?: string

Shell to use for execution command in all steps.

steps: Command[]

A list of Commands to execute within the job in the order which they were added.

working_directory?: string

In which directory to run the steps. Will be interpreted as an absolute path.

Accessors

Methods

  • addEnvVar(name: string, value: string): Job
  • Add an environment variable to the job. This will be set in plain-text via the exported config file. Consider using project-level environment variables or a context for sensitive information.

    see

    https://circleci.com/docs/env-vars

    example
    myJob.addEnvVar('MY_VAR', 'my value');
    

    Parameters

    • name: string
    • value: string

    Returns Job

Generated using TypeDoc