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

Scripts not permitted to use staticMethod java.lang.Math max int int

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: script-security-plugin
    • Labels:
      None
    • Environment:
      pipeline 2.5, Jenkins 2.60.3
    • Similar Issues:

      Description

      Scripts not permitted to use staticMethod java.lang.Math max int int

        last_run = selectRun filter: parameters("Target_OS=CentOS${os}"), job: env.JOB_NAME, selector: status('STABLE'), verbose: true
        id_to_copy = Math.max(id_to_copy,last_run.getId() as int)
      

      Expected outcome: ability to use, or at least approve under /scriptApproval/, Math.max(). If there's a better way to do it, I am a groovy noob and just copying examples in most places.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abayer Andrew Bayer
                Reporter:
                aarondmarasco_vsi Aaron Marasco
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: