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

Make the Grooy pipeline whitelist editable

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Developing a Jenkinsfile is very difficult because even simple functions are not whitelisted. Examples of strange things:

      • the .contains() function for maps/lists
      • when declaring a map in Jenkinsfile, the key cannot be named print or println (Jenkins thinks, the equally named functions are used here)
      • When a map contains functions (closures), Jenkins does not allow writing myMap.myFunction arg1 arg2 because Jenkins thinks, myFunction is a function defined in the Map<...> class. Since the Jenkinsfile is simply a groovy file, I think that I can use the Map property notation.

      Also, when using a Multibranch Pipeline project, writing a Jenkinsfile needs lots of commits, if I need to try something out (which does not always work, see points above).

      Improvement:

      • Make the whitelist editable (and, in a help box, the syntax needed to add properly formatted entries)
      • Provide a Jenkinsfile "validator" which gets a Jenkinsfile (via text box or upload) and which checks, if this file can be used in terms of syntax/whitelist. This will prevent users to make many commits while developing a Jenkinsfile.

        Attachments

          Activity

          Hide
          jglick Jesse Glick added a comment -

          In some sense a duplicate of many other filed things, though your specific suggestions are either impossible or not the planned approach.

          Show
          jglick Jesse Glick added a comment - In some sense a duplicate of many other filed things, though your specific suggestions are either impossible or not the planned approach.

            People

            • Assignee:
              jglick Jesse Glick
              Reporter:
              cludwig Christoph Ludwig
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: