Giter VIP home page Giter VIP logo

linter-jenkins's People

Contributors

bop0hz avatar jdrinkwater-r7 avatar mschuchard avatar tyzbit avatar woneill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

linter-jenkins's Issues

CURL method should enclose the payload in double quotes

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).

[CLI and SSH] Linter plugin fails when a ~/.ssh/config exists

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,

How to tell if this is working

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.

Curl method isn't using -k option

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.

No Feedback

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!

Curl method doesn't work

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.

Screenshot (38)_LI

with debug command

image
without debug command

No way of passing credentials to CURL method

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.