mschuchard / linter-jenkins Goto Github PK
View Code? Open in Web Editor NEWJenkinsfile lint via declarative linter for pulsar
License: MIT License
Jenkinsfile lint via declarative linter for pulsar
License: MIT License
Checking the constructed curl command from the debug record, it is apparent that the -F
option followed by the contains of the dockerfile is not enclosed in double quotes, which breaks the whole command (as it contains spaces).
After a long troubleshooting session (my Jenkins servers use Github Oauth, so the setup wasn't straight forward) I manage to get this working using "CLI and SSH", the only issue is that jenkins-cli.jar throws an INFO message if a ~/.ssh/config file exists:
guille$ java -jar ~/jenkins-cli.jar -s https://jenkins.paris-squad.com -ssh -user goperez -i ~/.ssh/jenkins-master declarative-linter < /Users/username/Projects/BuildJenkinsfile
Dec 05, 2018 6:31:15 PM org.apache.sshd.client.config.hosts.ConfigFileHostEntryResolver reloadHostConfigEntries
INFO: resolveEffectiveResolver([email protected]:2222) loaded 25 entries from /Users/guille/.ssh/config
Jenkinsfile successfully validated.
And it just so happens that your app considers this INFO message as an error and throws an exception:
[Linter] Error running Jenkins Error: Dec 05, 2018 6:36:25 PM org.apache.sshd.client.config.hosts.ConfigFileHostEntryResolver reloadHostConfigEntries
INFO: resolveEffectiveResolver([email protected]:2222) loaded 25 entries from /Users/username/.ssh/config
at ChildProcess.<anonymous> (/Users/guille/.atom/packages/linter-jenkins/node_modules/sb-exec/lib/index.js:41)
at emitTwo (events.js:126)
at ChildProcess.emit (events.js:214)
at maybeClose (internal/child_process.js:925)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209)
I'm assuming this would be the case if Jenkins returns anything but the expected string through stdout. It's an edge corner but it also means the error handling is a little poor, totally worth looking into it (I would if I had more JS experience).
Thank you,
I've just installed this package, and I'm not positive that the linter is able to communicate with my Jenkins host. What is the best way to check that? It might be useful to have a command in the command palette which just verifies connectivity, using the package's settings.
It looks like even when leaving the "Validate SSL Cert" option un-checked in settings, the -k option isn't being sent to curl when sending the POST to Jenkins for validation.
I've set up the package using the CURL method and supplied credentials, but I get no feedback whatsoever in regards to whether it is working, or unable to connect to the server. I've installed Linter, checked that the jenkins linter is detected and enabled, and tried enabling debug mode. Is this a bug or am I missing something? Thanks!
Hi, I am not seeing the debug command in the linter UI even though the file language is detected as Jenkinsfile. If I change the filename to just "Jenkinsfile" I see the debug command then, but it still doesn't provide any error/warnings when I make any file changes.
with debug command
there seems to be a missing Authentication field
for the CURL method section. I can see this field at CLI Methods settings but not at CURL. Perhaps this field might be global to prevent redundancy.
Also I can confirm from the debug output, that the constructed curl command does not contain -u user:pass
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.