Skip to content
This repository was archived by the owner on Apr 7, 2024. It is now read-only.

WinnerSoftLab/jenkinslint

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jenkinslint

A basic Jenkinsfile linter (validator). Can validate files using a Jenkins web interface, or the Jenkins SSH interface.

pre-commit

Usage

To configure which type of validation to use (web or SSH), create an INI file named .jenkinslintrc in the root of your repository.

The following parameters are supported:

JENKINS_SERVER
Server name
JENKINS_SSH_PORT
When set, use SSH validation
JENKINS_UNSAFE_SSL
When set to TRUE, disable SSL/TLS certificate validation
JENKINS_URL
Full Jenkins URL for web-based validation

Not all parameters need to be set. Example:

JENKINS_SERVER=jenkins.demo.local
JENKINS_SSH_PORT=8022

Standalone

Validate files using jenkinslint followed by the name of the Jenkinsfile, e.g.

jenkinslint Jenkinsfile

Using the pre-commit framework

Install the pre-commit framework, and add the following to the .pre-commit-config.yaml file:

- repo: https://github.com/PeterMosmans/jenkinslint
  rev: master
  hooks:
   - id: jenkinslint

This will automatically validate files named Jenkinsfile during the pre commit phase.

About

Basic linter (validator) for Jenkinsfiles. Can easily be used in pre-commit hooks and the pre-commit framework

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • Shell 100.0%