Socket
Socket
Sign inDemoInstall

@techmynder/gitlab-ci-file-lint

Package Overview
Dependencies
14
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@techmynder/gitlab-ci-file-lint

Validate a GitLab pipeline YAML file using the official API.


Version published
Maintainers
3
Weekly downloads
213
increased by129.03%

Weekly downloads

Readme

Source

GitLab CI File Lint

A small library to help validate GitLab pipeline files using the official API.

Configuration

Create a .env file (or .env.local which will have precedence) with the following values:

NameDescriptionRequired
GITLAB_LINT_TOKENThe GitLab access token (api scope)Yes
GITLAB_LINT_PROJECT_IDThe GitLab project ID to validate againstYes
GITLAB_LINT_FILEThe name of the file to validateNo (default: .gitlab-ci.yml)
GITLAB_LINT_BASE_URLThe base URL for the API requestNo (default: https://gitlab.com)

Example

Using the minimal configuration in .env

GITLAB_LINT_TOKEN=secret
GITLAB_LINT_PROJECT_ID=1337

will validate the root .gitlab-ci.yml file.

Results

The results of the linter will be printed to the console with a matching exit code:

  • If the file has no issues, the script will exit with an exit code of 0.
  • If the file has no issues but warnings, the script will exit with an exit code of 0.
  • If the file has one or more issues, the script will exit with an exit code of 1.

Keywords

FAQs

Last updated on 17 Mar 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc