i am getting a failure calling the below function in a pipeline

    def getTimeStamp(str) {
       d = new Date(str).toTimestamp();
       return d
    }


Exception Caught:
org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException:
Scripts not permitted to use staticMethod
org.codehaus.groovy.runtime.SqlGroovyMethods toTimestamp
java.util.Date



If i unchecked the "groovy sandbox" and paste the pipeline - it WORKS
while if i checkout the jenkinsfile from the repo, the same error comes
back. Is there a way where i can disable "sandbox" while retrieving the
pi[eline script from a git repo?

Note: the method doesnt show up for approval too



-- 
Regards
nirish okram

-- 
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/CAPzcO4gxDR0idMzm8n9Y0W-5OoK4s7tty_uNGDzeQLvAija_wQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
  • [no subject] niristotle okram
    • Re: Slide
      • Re: niristotle okram
        • Re: Victor Martinez
          • Re: niristotle okram
            • Re: Victor Martinez
              • Re: niristotle okram

Reply via email to