Whitelist Groovy capitalize method from String for sandbox

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      I get the following error when trying to pipeline build:

      org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods capitalize java.lang.String

      It's triggered by the code in my pipeline definition:

      def branchToBuild = "${env.JOB_NAME}".tokenize('-').last()
      def dockerTaskBranch = branchToBuild.capitalize()

      The capitalize method should be safe enough to call from the sandbox

            Assignee:
            vjuranek
            Reporter:
            Greg Pagendam-Turner
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: