Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-44558

P4Groovy works with "Pipeline script from SCM" without disabling sandbox

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • p4-plugin
    • None
    • * Jenkins 2.56
      * Script Security Plugin 1.27
      * Pipeline: Groovy 2.29
      * P4 Plugin 1.6.1

      The P4 Groovy documentation says:

      To allow P4Groovy code to be executed uncheck the 'Use Groovy Sandbox' checkbox under the Pipeline script.

      However, the "Pipeline script from SCM" option does not currently support disabling the Groovy Sandbox.

      Happily, when I tried P4 Groovy anyway, I simply had to whitelist
      method org.jenkinsci.plugins.p4.groovy.P4Groovy run java.lang.String java.lang.String[] when prompted, and it appears to be operating without issues.

      I didn't try the inline pipeline script setup, and there's no record in the git history of why this restriction is listed in the documentation.

      So worth retesting whatever issues were seen before, and hopefully that means the documentation can be updated to remove the restriction.

            Unassigned Unassigned
            p_hampson Paul "TBBle" Hampson
            Votes:
            4 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: