Extended Choice Parameter read from JSON file

101 views
Skip to first unread message

Gadi Dor

unread,
Jan 25, 2017, 7:06:40 AM1/25/17
to Jenkins Users
Dear Sir,

I want to start using Extended Choice Parameter ,

I can load json parameter from here:

def object = '''{
        disable_edit_json: true,
        disable_properties: true,
        no_additional_properties: true,
        disable_collapse: true,
        disable_array_add: true,
        disable_array_delete: true,
        disable_array_reorder: true,
        theme: "bootstrap2",
        iconlib:"fontawesome4",
        schema: {
          "type": "object",
          "title": "Name",
          "properties": {
            "first_name": {
              "type": "string",
              "propertyOrder" : 1
            },
            "last_name": {
              "type": "string",
              "propertyOrder" : 2
            },
            "full_name": {
              "type": "string",
              "propertyOrder" : 3,
              "template": "{{fname}} {{lname}}",
              "watch": {
                "fname": "first_name",
                "lname": "last_name"
              }
            }
          }
        },
        startval: {
            "first_name" : "John",
            "last_name" : "Doe",
            "full_name" : "John Doe"
        }
}'''

but I want to load object has a file,

something like:

def  fileContents = new File('test.json').text

def jsonEditorOptions = Boon.fromJson(fileContents)

return jsonEditorOptions;

Paz Schori

unread,
Jul 10, 2018, 5:38:17 PM7/10/18
to Jenkins Users

hi we also try to use Extended Choice Parameter by load json from file, did you manage to solve this , will appreciated if you can share how you solve it
?
בתאריך יום רביעי, 25 בינואר 2017 בשעה 14:06:40 UTC+2, מאת Gadi Dor:
Reply all
Reply to author
Forward
0 new messages