Skip to content

tcumby/pre-commit-jenkinsfile

Repository files navigation

supported python versions

Project generated with PyScaffold pre-commit Security Status Code Style: Black

pre-commit-jenkinsfile

A pre-commit hook script for linting Jenkinsfile declarative pipelines.

Available Hook

lint-jenkinsfile

HTTP Access Options
--jenkins_url <url>
 The URL for the Jenkins server.
--jenkin_login <login>
 The login for an account on the Jenkins server.
--jenkins_api_token <token>
 The API token for the account on the Jenkins server.
SSH Access Options
--jenkins_hostname <hostname>
 The hostname for the Jenkins server.
--jenkins_ssh_port <port>
 The SSH port number for the Jenkins server. Default is 22.
Config File Option

Alternatively, these settings can be specified in an INI formatted file

--config <file>
 An absolute or relative file path.
Config File Syntax

The following are the allow sections and keys for the config file:

[http]
url = <url>
login = <login>
api_key = <key>

[ssh]
hostname = <hostname>
port = <port>

Note that is only necessary to specify the keys in the http or ssh section.

Using with pre-commit

To use with pre-commit, add the following to your .pre-commit-config.yaml file:

- repo: https://github.com/tcumby/pre-commit-jenkinsfile
  rev: master
  hooks:
   - id: lint-jenkinsfile

About

A pre-commit hook to validate Jenkins pipeline files via a Jenkins server instance.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages