- A pre-commit hook script for linting Jenkinsfile declarative pipelines.
| --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. | |
| --jenkins_hostname <hostname> | |
| The hostname for the Jenkins server. | |
| --jenkins_ssh_port <port> | |
| The SSH port number for the Jenkins server. Default is 22. | |
Alternatively, these settings can be specified in an INI formatted file
| --config <file> | |
| An absolute or relative file path. | |
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.
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