Extend / override declarative pipeline syntax

12 views
Skip to first unread message

gregory...@gmail.com

unread,
Nov 21, 2018, 10:27:19 AM11/21/18
to Jenkins Users
Hi List, 

Is there a way to extend or override declarative pipeline syntax ?

I would like to be able to provide a library I would use this way :

pipeline {
  agent any
  tools { ... }
  stages {
    stage ("My custom stage") { ... }
    standardStage()
    stage ("My custom stage") { ... }
  }
}

where standardStage would be defined ilike this :

def call() {
  stage("Standard stage") { ... }
}

which is not possible because of declarative pipeline syntax check ("standardStage" is not a legal child of "stages")


Thanks in advance,
Grégory
Reply all
Reply to author
Forward
0 new messages