Categories of Predefined Variables
Inspecting All Available Variables
To view every environment variable supplied to a CI job, add a job that runs theexport command:

1. Creating a New GitLab Project
- Navigate to your GitLab instance and click New project.
- Select Create blank project, choose a group (e.g.,
demos-group), set visibility to Public, and initialize with a README. - Clone the repository locally or open it in the Web IDE.

.gitlab-ci.yml file at the root of your project:
2. Pipeline Overview
Once pushed, GitLab triggers a pipeline named Exploring Predefined Variable Pipeline. By default, all jobs run in thetest stage and execute in parallel:

2.1 export_variable_job
This job dumps all environment variables. Here’s a truncated output:Running
export will print all environment variables, including sensitive tokens. Ensure your job logs are protected.2.2 generic_predefined_variables
This job echoes commonly used variables to illustrate dynamic scripting:2.3 merge_request_predefined_variables
This job attempts to print merge-request–specific variables:Merge request variables are only populated in pipelines triggered by Merge Requests. In direct pushes, these remain empty.
