Validate Jenkinsfile while using oauth

48 views
Skip to first unread message

domi

unread,
Nov 16, 2018, 8:12:49 AM11/16/18
to Jenkins Developers
Hi,
I really like the way I can validate my Jenkinsfile from within VS Code now: https://jenkins.io/blog/2018/11/07/Validate-Jenkinsfile/

But how can I do this when I use any of the Oauth-Plugins like the one for Github[1] or Bitbucket [2]?

/Domi

Jesse Glick

unread,
Nov 16, 2018, 2:19:17 PM11/16/18
to jenkin...@googlegroups.com
On Fri, Nov 16, 2018 at 8:12 AM domi <do...@fortysix.ch> wrote:
> I really like the way I can validate my Jenkinsfile from within VS Code now: https://jenkins.io/blog/2018/11/07/Validate-Jenkinsfile/
>
> But how can I do this when I use any of the Oauth-Plugins like the one for Github[1] or Bitbucket [2]?

I presume that `jenkins.pipeline.linter.connector.pass` could be an
API token rather than a password. In fact, it really should be, even
if you are using a password-based security realm. Probably this is
just a matter of fixing the documentation to clarify that.

domi

unread,
Nov 19, 2018, 7:29:28 AM11/19/18
to Jenkins Developers
Unfortunately this does not seem to work :(
> --
> You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3xpZPi6qU%2BaEg37Ov7Bxn7GLAP29tdc7S1_d4SCAr-jw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

Christopher Orr

unread,
Nov 19, 2018, 3:35:59 PM11/19/18
to jenkin...@googlegroups.com
FWIW, I had no problems setting it up with an API token last week (in place of a password), on a Jenkins instance that uses the Google Login plugin for authentication.
> https://groups.google.com/d/msgid/jenkinsci-dev/1FB72438-6AB1-4EAD-AFBF-9540101F6424%40fortysix.ch.

Richard Bywater

unread,
Nov 20, 2018, 12:05:41 AM11/20/18
to jenkin...@googlegroups.com
I also just today set the password in Visual Code Studio to be my API token and it worked like a charm. 

Richard. 

domi

unread,
Nov 20, 2018, 1:48:30 AM11/20/18
to Jenkins Developers
Thanks guys, I must have made a typo somewhere... - I did a clean setup and tried the whole ting again - now it works!
Many thanks!

Reply all
Reply to author
Forward
0 new messages