Hello all,

I have switched all my Java build job to use a common declarative pipeline, 
so in all my JenkinsFile, I have the very simple following content:

@Library('classicJavaBuild') _
>
> classicJavaBuild()
>

and the shared pipeline is defined as:

def call(skipSonarParam = false, skipTestsCompileAndExecParam = false, 
> skipDocGenerationParam = false, doMavenReleaseParam = false) {
>    
>     pipeline {
>         agent { node { label 'linuxWithXvfb' } } 
>         
>         parameters {
>             booleanParam(defaultValue: skipSonarParam,
>                 description: 'skip Sonar reporting',
>                 name: "skipSonar")
>             booleanParam(defaultValue: skipTestsCompileAndExecParam,
>                 description: 'skip tests execution BUT ALSO TESTS 
> COMPILATION',
>                 name: "skipTestsCompileAndExec")
>             }
>           
>         tools { 
>             maven 'maven-3' 
>             jdk 'jdk-8' 
>         }
>         
>         stages {
>     ......a few stages....
>
 
 

So far everything is fine. But now I have a new project where I would like 
to "extend" this pipeline:

1- add a new parameter exclusively in the new project while retaining the 
common ones
2- add a new 'stage' (or maybe a new step in an existing stage).

Is there any way to add extension points to a pipeline in a shared library 
so that my Jenkinsfile can still benefit from my common pipeline while 
defining also it's own additions ?

Regards

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/c9ad9c64-a039-4038-ac0e-0ba31bc177af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to