doc/editor_extensions/visual_studio_code/cicd.md
{{< details >}}
{{< /details >}}
{{< history >}}
{{< /history >}}
If your GitLab project uses CI/CD pipelines, you can start, watch, and debug CI/CD pipelines from the GitLab for VS Code extension. When you work locally on a Git branch, the bottom status bar shows either:
Possible statuses include:
Use this extension to start, monitor, and debug CI/CD pipelines in GitLab.
Prerequisites:
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:
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:
To view the output for a CI/CD job for your current branch:
On the left vertical menu bar, select GitLab ({{< icon name="tanuki" >}}) to display the extension sidebar.
In 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:
The downstream pipelines appear under the pipelines. To open a downstream pipeline job log:
Use the GitLab: Validate GitLab CI Config command to test your project's GitLab CI/CD configuration locally.
.gitlab-ci.yml file, and ensure the file's tab is in focus.GitLab: Validate GitLab CI Config and press <kbd>Enter</kbd>.The extension shows an alert if it detects a problem with your 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.
In the upper right, select Show Merged GitLab CI/CD Configuration:
VS Code opens a new tab (.gitlab-ci (Merged).yml) with full information.
Quickly find the CI/CD variable you are looking for with CI/CD variable autocompletion.
Prerequisites:
.gitlab-ci and ends with .yml or .yaml.
For example .gitlab-ci.yml or .gitlab-ci.production.ymlTo autocomplete a variable:
In VS Code, open your .gitlab-ci.yml file, and ensure the file's tab is in focus.
Begin entering the name of a variable to display auto-complete options.
Select an option to use it: