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
What Is CI_PROJECT_PATH?CI_PROJECT_PATH is the namespace/project path of a GitLab project in CI, like mygroup/myapp. Learn its uses.
What Is GITHUB_WORKSPACE?GITHUB_WORKSPACE is the directory where your repository is checked out in GitHub Actions. Learn what it point…
What Is a CI Runner? Managed vs Self-Hosted ExplainedA CI runner is the machine that executes your pipeline jobs. Learn how runners work, the difference between h…