CI/CD pipelines in the VS Code extension
If your GitLab project uses CI/CD pipelines, you can start, watch, and debug CI/CD pipelines from the GitLab Workflow extension for VS Code. When you work locally on a Git branch, the bottom status bar shows either:
- The status of its most recent pipeline.
- No pipeline if a pipeline hasn’t run yet.
Possible statuses include:
- Pipeline canceled
- Pipeline failed
- Pipeline passed
- Pipeline pending
- Pipeline running
- Pipeline skipped
View pipeline information
Use this extension to start, monitor, and debug CI/CD pipelines in GitLab.
Prerequisites:
- Your project uses CI/CD pipelines.
- A merge request exists for your current Git branch.
- The most recent commit on your current Git branch has a CI/CD pipeline.
To view pipeline information:
In VS Code, on the bottom status bar, select the pipeline status to display actions in the Command Palette.
In the Command Palette, select your desired action:
- Create New Pipeline From Current Branch: Start a new pipeline.
- Cancel Last Pipeline
- Download Artifacts from Latest Pipeline: Download the pipeline artifact in ZIP or JSON format.
- Retry Last Pipeline
- View Latest Pipeline on GitLab: Open the pipeline’s page in a browser tab.
Show pipeline alerts
This extension can display an alert in VS Code when a pipeline for your current branch completes:
To show alerts for your current Git branch:
- In VS Code, on the top menu, select Code > Settings > Settings.
- Depending on your configuration, select either User or Workplace settings.
- In the main tab, select Extensions > GitLab Workflow to view this extension’s settings.
- Under Show Pipeline Update Notifications, select the Show notification in VS Code when the pipeline status changes checkbox.
View CI/CD job output
To view the output for a CI/CD job for your current branch:
On the left vertical menu bar, select GitLab Workflow ( ) to display the extension sidebar.
On the sidebar, expand For current branch to show its most recent pipeline.
Select your desired job to open it in a new VS Code tab:
Test GitLab CI/CD configuration
Use the GitLab: Validate GitLab CI Config
command to test your project’s GitLab CI/CD configuration locally.
- In VS Code, open your
.gitlab-ci.yml
file, and ensure the file’s tab is in focus. - Open the Command Palette:
- For macOS, press Command+Shift+P.
- For Windows or Linux, press Ctrl+Shift+P.
- In the Command Palette, search for
GitLab: Validate GitLab CI Config
and press Enter.
The extension shows an alert if it detects a problem with your configuration.
Show merged GitLab CI/CD configuration
Use this command to see a preview of your merged CI/CD configuration file, with all includes and references resolved.
In VS Code, open your
.gitlab-ci.yml
file, and ensure the file’s tab is in focus.On the top right, select Show Merged GitLab CI/CD Configuration:
VS Code opens a new tab (.gitlab-ci (Merged).yml
) with full information.
CI/CD variable autocompletion
Quickly find the CI/CD variable you are looking for with the CI/CD variable autocompletion.
Prerequisites:
- Your file is named either:
.gitlab-ci.yml
.- Beginning with
.gitlab-ci
and ending with.yml
or.yaml
, like.gitlab-ci.production.yml
.
To autocomplete a variable:
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support