Sorry for the update to older thread but it turns out this process can
actually be much easier by using the token from your OC session, which
doesn't require decoding or multiple calls to retrieve:

curl -X POST -H "Authorization: Bearer $(oc whoami -t)" -F
"jenkinsfile=<Jenkinsfile" $JENKINS_URL/pipeline-model-converter/validate

HTH

On Wed, Jul 18, 2018 at 11:41 AM Andrew Feller <[email protected]>
wrote:

> Thanks to Gabe for a little bit of help on the side, I was able to figure
> out a few more particulars for others looking to do this and opened a PR
> <https://github.com/openshift/jenkins-openshift-login-plugin/pull/43> to
> enhance the jenkins-openshift-login-plugin documentation for others looking
> to do the same.  I've created a Bash script that makes this trivial but
> haven't received permission to contribute yet; this is the least I can do
> for now for others.
>
> On Thu, Jul 5, 2018 at 9:23 AM Gabe Montero <[email protected]> wrote:
>
>> We support passing in a valid OpenShift token as a bearer token with curl
>> requests against
>> a deployment of the OpenShift Jenkins image.
>>
>> You should be able to leverage the curl based accessed noted at the link
>> you posted.
>>
>> See
>>
>> https://github.com/openshift/jenkins-openshift-login-plugin#non-browser-access
>> https://github.com/openshift/jenkins#jenkins-admin-user
>>
>> https://docs.openshift.org/latest/using_images/other_images/jenkins.html#jenkins-openshift-oauth-authentication
>>
>>
>>
>> On Thu, Jul 5, 2018 at 7:51 AM, Andrew Feller <[email protected]>
>> wrote:
>>
>>> I imagine developers leveraging Jenkins declarative linter
>>> <https://jenkins.io/doc/book/pipeline/development/#linter> from Jenkins
>>> hosted within OpenShift is more difficult because OpenShift is handling
>>> identity management, but has anyone had luck with supporting this?  I
>>> realize the nature of Jenkins makes this complicated so don't expect there
>>> to be a great solution here.
>>>
>>> Thanks!
>>>
>>> --
>>>
>>> [image: BandwidthMaroon.png]
>>>
>>> Andy Feller  •  Sr DevOps Engineer
>>>
>>> 900 Main Campus Drive, Suite 500, Raleigh, NC 27606
>>>
>>>
>>> e: [email protected]
>>>
>>> _______________________________________________
>>> users mailing list
>>> [email protected]
>>> http://lists.openshift.redhat.com/openshiftmm/listinfo/users
>>>
>>>
>>
>
> --
>
> [image: BandwidthMaroon.png]
>
> Andy Feller  •  Sr DevOps Engineer
>
> 900 Main Campus Drive, Suite 500, Raleigh, NC 27606
>
>
> e: [email protected]
>


-- 

[image: BandwidthMaroon.png]

Andy Feller  •  Sr DevOps Engineer

900 Main Campus Drive, Suite 500, Raleigh, NC 27606


e: [email protected]
_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to