Skip to content
Latchkey

What Is CI_PROJECT_DIR?

CI_PROJECT_DIR is the full path where the repository is cloned and where jobs run.

CI_PROJECT_DIR is the GitLab equivalent of a workspace path; reference it instead of hard-coding paths, especially inside containers.

Note

Inside a container job the path is set by the runner; using CI_PROJECT_DIR keeps scripts portable.

Key takeaways

  • CI_PROJECT_DIR is the checkout directory.
  • Use it instead of hard-coded paths.
  • Important for container jobs.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →