Skip to content

CI_JOB_NAME variable does not set with parallel feature

Summary

CI_JOB_NAME is empty if I use the parallel feature.

Steps to reproduce

Implement parallel feature and try to read the CI_JOB_NAME environment variable in script.

Example Project

test:
 <<: *test_definition
 script:
  - myscript.py -job %CI_JOB_NAME%
 parallel: 2

What is the current bug behavior?

CI_JOB_NAME does not set

What is the expected correct behavior?

CI_JOB_NAME not empty

Possible fixes

Workaround:

test:
 <<: *test_definition
 variables:
  CI_JOB_NAME: "test"
 script:
  - myscript.py -job %CI_JOB_NAME%
 parallel: 2