Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eastwd/jenkins-lint
Jenkinsfile linter
https://github.com/eastwd/jenkins-lint
jenkins jenkinsfile linter
Last synced: about 2 months ago
JSON representation
Jenkinsfile linter
- Host: GitHub
- URL: https://github.com/eastwd/jenkins-lint
- Owner: eastwd
- License: apache-2.0
- Created: 2018-05-02T15:31:51.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-14T01:49:46.000Z (4 months ago)
- Last Synced: 2024-11-15T21:31:06.790Z (3 months ago)
- Topics: jenkins, jenkinsfile, linter
- Language: Go
- Homepage:
- Size: 168 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jenkins-lint
Jenkinsfile linter
## description
- Access the Jenkins validation API and lint Jenkinsfile
## install
```
go get -u github.com/eastwd/jenkins-lint
```## setting
- Generate your API token
- https://[your jenkins url]/user/[your name]/configure- Create .jlint.toml in home directory
```
[Client]
Host = "http://localhost:8080"
Insecure = false[Account]
Username = "your name"
APIToken = "your API token"
```## usage
```
$ jenkins-lint -f ./test/Jenkinsfile
Jenkinsfile successfully validated.$ jenkins-lint -f ./test/Jenkinsfile.failed
1 : pipeline {
2 : agent {
3 : docker {
4 : image 'alpine'
5 : label 'linux'
6 : }
7 : }
8 : stages {
9 : steps {
10 : echo 'hello-world'
11 : sh 'whoami'
12 : sh 'pwd'
13 : }
14 : }
15 : stage('Test') {
16 : steps {
17 : echo 'Testing..'
18 : }
19 : }
20 : stage('Deploy') {
21 : steps {
22 : echo 'Deploying....'
23 : }
24 : }
25 : }
26 : }
27 :
Errors encountered validating Jenkinsfile:
WorkflowScript: 26: unexpected token: } @ line 26, column 1.
}
^```