Using the snippet generator I see that the syntax for properties have 
changed

I have broken it up in multiple lines with indentation so it is easier to 
read and see all the distinct parts.

I have been using the following to add properties in my pipeline script:
properties([
    [$class: 'ParametersDefinitionProperty',
     parameterDefinitions: [
          [$class: 'BooleanParameterDefinition', defaultValue: false, 
description: 'description', name: 'PARAM1'],
          [$class: 'BooleanParameterDefinition', defaultValue: false, 
description: 'description', name: 'PARAM2']
     ]
    ]
])

This is what the snippet generator now gives me:
properties([
    [$class: 'GitLabConnectionProperty', gitLabConnection: ''],
    parameters([
        booleanParam(defaultValue: false, description: 'description', name: 
'PARAM1'),
        booleanParam(defaultValue: false, description: 'description', name: 
'PARAM2')
    ]),
    pipelineTriggers([])
])

It seems the old way of writing this still works though.

I do not know why it added GitLabConnection and pipelineTriggers. I only 
selected "This project is parameterized" in the snippet generator:

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e079bde6-3f9c-4889-a420-4ee661e0a6d0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to