--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/66daab97-8089-4be4-8161-288c5e0509cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I don't see anything on my "script approval" page implying I did anything special to allow this:
import groovy.json.JsonSlurper
def final BUILT_AREA = WORKSPACE + "/testing_support/built_area/"
def final job2_config = new JsonSlurper().parseText(readFileFromWorkspace("${BUILT_AREA}/.jenkins_metadata_job2.json"))
# OK
new groovy.json.JsonSlurper().parseText('{"name": "value"}')
# ERROR: Scripts not permitted to use new groovy.json.JsonSlurperClassic
new groovy.json.JsonSlurperClassic().parseText('{"name": "value"}')
I don't see anything on my "script approval" page implying I did anything special to allow this:
import groovy.json.JsonSlurper
def final BUILT_AREA = WORKSPACE + "/testing_support/built_area/"
def final job2_config = new JsonSlurper().parseText(readFileFromWorkspace("${BUILT_AREA}/.jenkins_metadata_job2.json"))
From: job-dsl...@googlegroups.com <job-dsl...@googlegroups.com> on behalf of Kamil Demecki <kods...@gmail.com>
Sent: Friday, October 12, 2018 08:56
To: job-dsl-plugin
Subject: readJSON in sanboxed DSL withouth approval
--Hi,
I cannot find how to parse json in sandboxed DSL script.
I have used groovy.json.JsonSlurper().parse but I need to port DSL script to Jenkins instance with security enabled for DSL and so can call only whitelisted methods.
I thought about using pipeline-utility-steps plugin. I am able to call readJSON in Jenkins pipeline script running inside sandbox (pipeline script - not DSL script)
Is there a way to call readJSON from pipeline-utility-steps plugin in DSL script or other way to parse JSON in sandbox without need for manual approval?
Regards
Kamil
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plug...@googlegroups.com.
To post to this group, send email to job-ds...@googlegroups.com.