Job Environment Variables

When you create a job or a job run, you can provide custom environment variables and command line arguments.

Constraints
  • Custom environment variables—The total character count across the key and value pairs for all custom environment variables. Can't exceed 20,000 characters.
  • Command line arguments—Input for the command line arguments field can't exceed 4,000 characters.

With a job run, the following service provided environment variables are automatically made available:

Service Provided Environment Variables

Name

Description

TENANCY_OCID

OCID of the tenancy the job belongs to.

PROJECT_OCID

OCID of the project the job is associated with.

PROJECT_COMPARTMENT_OCID

OCID of the compartment of the project the job is associated with.

JOB_OCID

OCID of the job is associated with.

JOB_COMPARTMENT_OCID

OCID of the compartment of the job is associated with.

JOB_ARTIFACT_FILE_NAME

The file name of the job artifact that was uploaded.

JOB_RUN_OCID

OCID of the job run.

JOB_RUN_COMPARTMENT_OCID

OCID of the compartment of the job run.

In addition to the service job run environment variables, you can also use these environment variables:

Optional Environment Variables

Name

Description

CONDA_ENV_TYPE

Conda environment type. Either service or published.

CONDA_ENV_SLUG

Service conda environment slug. For example, database_p37_cpu_v2 for the Oracle Database on Python 3.7 (version 2.0) conda environment.

CONDA_ENV_REGION

Published conda environment region.

CONDA_ENV_OBJECT_NAME

Published conda environment object name.

CONDA_ENV_NAMESPACE

Published conda environment Object Storage namespace.

CONDA_ENV_BUCKET

Published conda environment Object Storage bucket.

JOB_RUN_ENTRYPOINT

Required for zip or tar files. Specifies the entry point file in the job artifact to be run.