Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/petermosmans/jenkinslint
Basic linter (validator) for Jenkinsfiles. Can easily be used in pre-commit hooks and the pre-commit framework
https://github.com/petermosmans/jenkinslint
jenkins jenkinsfile linter pre-commit pre-commit-hook validator
Last synced: 4 months ago
JSON representation
Basic linter (validator) for Jenkinsfiles. Can easily be used in pre-commit hooks and the pre-commit framework
- Host: GitHub
- URL: https://github.com/petermosmans/jenkinslint
- Owner: PeterMosmans
- License: gpl-3.0
- Created: 2020-07-10T08:03:54.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-06-13T19:43:09.000Z (over 2 years ago)
- Last Synced: 2023-08-07T11:22:01.213Z (over 1 year ago)
- Topics: jenkins, jenkinsfile, linter, pre-commit, pre-commit-hook, validator
- Language: Shell
- Homepage:
- Size: 17.6 KB
- Stars: 13
- Watchers: 1
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
###########
jenkinslint
###########A basic Jenkinsfile linter (validator). Can validate files using a Jenkins web
interface, or the Jenkins SSH interface... image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white
:target: https://github.com/pre-commit/pre-commit
:alt: pre-commitUsage
=====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 nameJENKINS_SSH_PORT
When set, use SSH validationJENKINS_UNSAFE_SSL
When set to TRUE, disable SSL/TLS certificate validationJENKINS_URL
Full Jenkins URL for web-based validationNot all parameters need to be set. Example:
::
JENKINS_SERVER=jenkins.demo.local
JENKINS_SSH_PORT=8022Standalone
----------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: jenkinslintThis will automatically validate files named ``Jenkinsfile`` during the pre
commit phase.