如何使用声明性语法配置Jenkins多分支管道创建的作业?

如何使用声明性语法配置Jenkins多分支管道创建的作业?,jenkins,groovy,jenkins-pipeline,jenkins-declarative-pipeline,Jenkins,Groovy,Jenkins Pipeline,Jenkins Declarative Pipeline,例如,我想使用声明性语法配置在多分支管道中使用。 为此目的,我们提供了如下代码: properties([ [ $class:'HudsonNotificationProperty', endpoints:[ [ urlInfo:[ urlOrId:'https://example.com/smth', urlType:'PUBLIC'

例如,我想使用声明性语法配置在多分支管道中使用。 为此目的,我们提供了如下代码:

properties([  
   [  
      $class:'HudsonNotificationProperty',
      endpoints:[  
         [  
            urlInfo:[  
               urlOrId:'https://example.com/smth',
               urlType:'PUBLIC'
            ]
         ]
      ]
   ],
   pipelineTriggers(   [  

   ]   )
])

我相信它是用语法写的。如何使用语法将其集成到我的项目中?

在声明管道之前粘贴属性片段:

#!/usr/bin/env groovy

properties([[$class: 'HudsonNotificationProperty',
  endpoints: [[urlInfo: [urlOrId: 'https://foo.bar.com', urlType: 'PUBLIC']]]]]
 )

pipeline {
...
}

你知道怎么才能让它恢复工作吗?自版本0.8以来,声明性管道语法不再支持它,因为
properties