Salut Sami :)

Cannot check it right now, but did you have a look under the
/scriptApproval page?

Though I seem to remember the 'unclassified' ones sometimes don't appear
there.

If you can see it, you have to approve it. This is a security measure to
not give access to the whole Jenkins instance/VM to all pipeline scripts.

Cheers

Le 10 août 2016 10:32 AM, "Sami Jaber" <[email protected]> a écrit :

> Hi all,
>
> Is there any way to parse JSON string in the Jenkinsfile groovy script to
> meet Jenkins security requirements and avoid the famous exception =>
> org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException:
> unclassified method groovy.json.JsonSlurper parse java.lang.String
>
> Just want to do :
>
> def jsonStream = readFile('jsonFile')
>
> echo 'Version ' + jsonStream.version
>
>
> Thanks for your answers or pointing me out right articles/guides
>
>
> Sami
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jenkinsci-users/b0412d4b-c461-43ee-921d-277495be6760%40googlegroups.
> com
> <https://groups.google.com/d/msgid/jenkinsci-users/b0412d4b-c461-43ee-921d-277495be6760%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS6oYQCuWLASjRPFi9h8wxCKNBJ7RBrkqmsx%3DCfHvgaDSA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to