{
  "_class" : "hudson.maven.MavenModuleSet",
  "actions" : [
    None,
    {
      
    },
    {
      
    },
    {
      
    },
    {
      
    },
    {
      
    },
    {
      
    },
    {
      
    },
    {
      "_class" : "org.jenkinsci.plugins.displayurlapi.actions.JobDisplayAction"
    },
    {
      "_class" : "com.cloudbees.plugins.credentials.ViewCredentialsAction"
    }
  ],
  "description" : "Introduction\u000a============\u000a\u000aCHGroovy is an extension to CommandHelper, that adds a single function, groovy() to your scripts. This allows you to dynamically run groovy scripts, from anywhere that CommandHelper can get them from, be it a file on the disk, or player input. This extension is mostly meant for debugging purposes, however, it can be used as a full blown script execution center.\u000a\u000aThe function takes up to 3 parameters. The first parameter is the script itself. This parameter can be the only one sent, and it will run just fine, for instance:\u000a\u000a    groovy('print \"Hello World!\"')\u000a\u000awill print \"Hello World!\" to the console. Keep in mind that since this is groovy, you can access all parts of the JVM at runtime, which is why this tool is excellent for debugging purposes.\u000a\u000aThe second parameter is a list of variable bindings to be passed in to groovy's environment. For instance, if you run:\u000a\u000a    groovy('print x', array(x: 4))\u000a\u000aThen it will print \"4\" to the console. The last parameter is an array of variable bindings to return. These will be returned as an associative array. For instance:\u000a\u000a    @ret = groovy('print x; z = 5', array(x: 4), array('z'))\u000a    msg('Value of z is: '.@ret['z'])\u000a\u000aWould print \"4\" to the console, and msg \"5\" out to the user. Values are attempted to be converted, if they are primitives, but there are no guarantees that complex values will be interpreted correctly. If this is the case, they will simply be toString'd, and returned as a string.\u000a\u000aIn Game Interpreter\u000a===================\u000a\u000aYou can use an in game interpreter, just like CommandHelper's built in /interpreter by using this code:\u000a\u000a    /g [$] = >>>\u000a            if($ == ''){\u000a                    export('groovy.status.'.player(), array(\u000a                            multiline: false,\u000a                            buffer: '',\u000a                    ))\u000a                    @pcID = bind(player_chat, null, array(player: player()), @e,\u000a                            @line = @e['message']\u000a                            @status = import('groovy.status.'.player())\u000a                            if(@line == '-'){\u000a                                    unbind()\u000a                                    unbind(import('groovy.player_leave.'.player()))\u000a                                    msg(color('YELLOW').'Now exiting interpreter mode')\u000a                            } else if(@status['multiline'] && @line == '>'.'>>'){\u000a                                    # Entering multiline mode\u000a                                    @status['multiline'] = true\u000a                                    msg(color(YELLOW).'You are now in multiline mode. Type <<< on a line by itself to execute.')\u000a                                    msg(color(GRAY).'>'.'>>')\u000a                            } else if(@status['multiline'] && @line == '<'.'<<'){\u000a                                    @buffer = @status['buffer']\u000a                                    @status['buffer'] = ''\u000a                                    msg(color(GRAY).'<'.'<<')\u000a                                    try(\u000a                                            groovy(@buffer)\u000a                                    , @e, #catch\u000a                                            msg(color(RED).@e[1])\u000a                                    )\u000a                            } else {\u000a                                    if(@status['multiline']){\u000a                                            # Multiline mode, buffer this\u000a                                            msg(color(GRAY).@line)\u000a                                            @status['buffer'] .= @line.'\\n'\u000a                                    } else {\u000a                                            # Single line mode, ready to execute this line\u000a                                            msg(color(GRAY).@line)\u000a                                            try(\u000a                                                    groovy(@line)\u000a                                            , @e, #catch\u000a                                                    msg(color(RED).@e[1])\u000a                                            )\u000a                                    }\u000a                            }\u000a                            export('groovy.status.'.player(), @status)\u000a                            # Cancel the chat, since we're consuming it\u000a                            cancel()\u000a                    )\u000a                    export('groovy.player_chat.'.player(), @pcID)\u000a                    @plID = bind(player_quit, null, array(player: player()), @e,\u000a                            unbind(import('groovy.player_chat.'.player()))\u000a                            unbind()\u000a                    )\u000a                    export('groovy.player_leave.'.player(), @plID)\u000a                    msg(color(YELLOW).'You are now in'.color(LIGHT_PURPLE).'Groovy'.color(YELLOW).' interpreter mode.'\u000a                            .' Type a dash (-) on a line by itself to exit, and >>> to enter multiline     mode')\u000a            } else {\u000a                    try(\u000a                        groovy($)\u000a                    , @e, #catch\u000a                        msg(color(RED).@e[1])\u000a                    )\u000a            }\u000a    <<<\u000a\u000aIf you run /g by itself, you get put into interpreter mode, if you run /g SCRIPT, then it will immediately run the script for you.\u000a\u000aFor this extension to be useful, you need to know Groovy. The Groovy user guide can be found [here](https://groovy-lang.org/documentation.html).\u000aYou can skip any sections that refer to installing and running Groovy. As long as you can run groovy('print \"Hello World!\"') from a script,\u000ait is correctly set up. As this is an unrestricted shell, it is extremely important that you restrict access to this function. Otherwise,\u000aan attacker could take complete control of your system, since they could potentially run raw, fully functional, unrestricted code on your\u000amachine.\u000a",
  "displayName" : "CHGroovy",
  "displayNameOrNull" : None,
  "fullDisplayName" : "CHGroovy",
  "fullName" : "CHGroovy",
  "name" : "CHGroovy",
  "url" : "https://letsbuild.net/jenkins/job/CHGroovy/",
  "buildable" : True,
  "builds" : [
    {
      "_class" : "hudson.maven.MavenModuleSetBuild",
      "number" : 6,
      "url" : "https://letsbuild.net/jenkins/job/CHGroovy/6/"
    },
    {
      "_class" : "hudson.maven.MavenModuleSetBuild",
      "number" : 5,
      "url" : "https://letsbuild.net/jenkins/job/CHGroovy/5/"
    },
    {
      "_class" : "hudson.maven.MavenModuleSetBuild",
      "number" : 4,
      "url" : "https://letsbuild.net/jenkins/job/CHGroovy/4/"
    },
    {
      "_class" : "hudson.maven.MavenModuleSetBuild",
      "number" : 3,
      "url" : "https://letsbuild.net/jenkins/job/CHGroovy/3/"
    },
    {
      "_class" : "hudson.maven.MavenModuleSetBuild",
      "number" : 2,
      "url" : "https://letsbuild.net/jenkins/job/CHGroovy/2/"
    },
    {
      "_class" : "hudson.maven.MavenModuleSetBuild",
      "number" : 1,
      "url" : "https://letsbuild.net/jenkins/job/CHGroovy/1/"
    }
  ],
  "color" : "blue",
  "firstBuild" : {
    "_class" : "hudson.maven.MavenModuleSetBuild",
    "number" : 1,
    "url" : "https://letsbuild.net/jenkins/job/CHGroovy/1/"
  },
  "healthReport" : [
    {
      "description" : "Build stability: 2 out of the last 5 builds failed.",
      "iconClassName" : "icon-health-40to59",
      "iconUrl" : "health-40to59.png",
      "score" : 60
    }
  ],
  "inQueue" : False,
  "keepDependencies" : False,
  "lastBuild" : {
    "_class" : "hudson.maven.MavenModuleSetBuild",
    "number" : 6,
    "url" : "https://letsbuild.net/jenkins/job/CHGroovy/6/"
  },
  "lastCompletedBuild" : {
    "_class" : "hudson.maven.MavenModuleSetBuild",
    "number" : 6,
    "url" : "https://letsbuild.net/jenkins/job/CHGroovy/6/"
  },
  "lastFailedBuild" : {
    "_class" : "hudson.maven.MavenModuleSetBuild",
    "number" : 3,
    "url" : "https://letsbuild.net/jenkins/job/CHGroovy/3/"
  },
  "lastStableBuild" : {
    "_class" : "hudson.maven.MavenModuleSetBuild",
    "number" : 6,
    "url" : "https://letsbuild.net/jenkins/job/CHGroovy/6/"
  },
  "lastSuccessfulBuild" : {
    "_class" : "hudson.maven.MavenModuleSetBuild",
    "number" : 6,
    "url" : "https://letsbuild.net/jenkins/job/CHGroovy/6/"
  },
  "lastUnstableBuild" : None,
  "lastUnsuccessfulBuild" : {
    "_class" : "hudson.maven.MavenModuleSetBuild",
    "number" : 3,
    "url" : "https://letsbuild.net/jenkins/job/CHGroovy/3/"
  },
  "nextBuildNumber" : 7,
  "property" : [
    {
      "_class" : "com.coravy.hudson.plugins.github.GithubProjectProperty"
    },
    {
      "_class" : "com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty"
    }
  ],
  "queueItem" : None,
  "concurrentBuild" : False,
  "disabled" : False,
  "downstreamProjects" : [
    
  ],
  "labelExpression" : None,
  "scm" : {
    "_class" : "hudson.plugins.git.GitSCM"
  },
  "upstreamProjects" : [
    
  ],
  "modules" : [
    {
      "name" : "com.chgroovy:chgroovy",
      "url" : "https://letsbuild.net/jenkins/job/CHGroovy/com.chgroovy$chgroovy/",
      "color" : "blue",
      "displayName" : "CHGroovy"
    }
  ]
}