Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mschuchard/linter-jenkins
Jenkinsfile lint via declarative linter for pulsar
https://github.com/mschuchard/linter-jenkins
atom-editor atom-package hacktoberfest jenkins jenkins-pipeline jenkinsfile linter pulsar-edit pulsar-package
Last synced: 3 months ago
JSON representation
Jenkinsfile lint via declarative linter for pulsar
- Host: GitHub
- URL: https://github.com/mschuchard/linter-jenkins
- Owner: mschuchard
- License: mit
- Created: 2017-11-03T16:42:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-19T11:38:35.000Z (about 1 year ago)
- Last Synced: 2024-11-01T19:42:22.897Z (3 months ago)
- Topics: atom-editor, atom-package, hacktoberfest, jenkins, jenkins-pipeline, jenkinsfile, linter, pulsar-edit, pulsar-package
- Language: JavaScript
- Homepage:
- Size: 83 KB
- Stars: 8
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
![Preview](https://raw.githubusercontent.com/mschuchard/linter-jenkins/master/linter_jenkins.png)
### Linter-Jenkins
Linter-Jenkins aims to provide functional and robust `declarative-linter` linting functionality within Pulsar. This will lint your `Jenkinsfile`s using declarative syntax.This package is now in maintenance mode. All feature requests and bug reports in the Github repository issue tracker will receive a response, and possibly also be implemented (especially bug fixes). However, active development on this package has ceased.
### Installation
A Jenkins server with the `jenkins-pipeline` plugin installed is required to be accessible. If one is not available in your network, then it is recommended to stand up a portable server instance with Vagrant or Docker as both will work fine with this. The Atom-IDE-UI and Language-Jenkinsfile or Language-Groovy packages are also required. Additional requirements depend upon your usage method (see below).All testing is performed with the latest stable version of Pulsar. Any version of Atom or any pre-release version of Pulsar is not supported.
### Usage Methods
- **CLI and CURL**: Requires the `jenkins-cli` installed locally. Lints with `jenkins-cli` requesting the Jenkins server to access its own REST API endpoint.
- **CLI and SSH**: Requires the `jenkins-cli` installed locally. Lints with `jenkins-cli` requesting the Jenkins server to ssh into itself to execute the `declarative-linter`.
- **SSH then CLI**: Requires SSH installed locally and with access to the Jenkins server. Lints with `ssh` into the server, and then the server executing the `declarative-linter` implictly with `jenkins-cli`. This method is not recommended with Vagrant or Docker.
- **SSH then full CLI**: Requires SSH installed locally and with access to the Jenkins server. Lints with `ssh` into the server, and then the server explicitly executing the `jenkins-cli` to access its own REST API endpoint. This method is not recommended with Docker. `vagrant ssh-config` will reveal the information needed to use this with Vagrant.
- **CURL**: Requires CURL installed locally and with access to the Jenkins server. Lints with `curl` against the server's REST API endpoint. This is the easiest, but Jenkins discourages it for security reasons (CRSF helps with this and is handled automatically on the client side).### Debug
When you select `Debug Mode` from the package settings, the raw command used for linting will be output as info to the linter display in Atom. This is helpful for debugging whether your connection to the Jenkins Pipeline plugin is functioning. Note that CLI and SSH methods pipe in the `Jenkinsfile` content to `stdin`, which is represented as `< /path/to/Jenkinsfile` in the debug display. This might not necessarily be accurate for your OS.### Note
Due to some incompatibility between the Jenkins Pipeline Validator and Atom and/or its packages, a bug was introduced such that if there is a `;` or `:` in the comments of a `Jenkinsfile`, then the linter information will not display. Also, usage of a `;` in the code (even within a String) or `:` within comments will cause false errors. Please refrain from this usage in your `Jenkinsfile` until Atom and/or Jenkins fixes the bug.