Shared Pipeline Libraries / Shared Libraries / Pipeline: Shared Groovy Libraries

218 views
Skip to first unread message

Nathan Flynn

unread,
Jul 28, 2017, 4:32:01 AM7/28/17
to job-dsl-plugin
Hello,

is there any way for Job DSL to add/modify workflow-cps-global-lib - https://plugins.jenkins.io/workflow-cps-global-lib ?

I see we can manipulate folders and add the libraries but I don't see how I can add it to the 'Global Pipeline Libraries' found in ->configuration. 


folder(folderName) {
    properties {
        folderLibraries {
            libraries {
                libraryConfiguration {
                    name 'SharedLib'
                    retriever {
                        modernSCM {
                            scm {
                                git {
                                    id 'git-repo'
                                    remote 'https://github.com/X/X.git'
                                }
                            }
                        }
                    }
                    allowVersionOverride true
                    defaultVersion 'master'
                    implicit true
                }
            }
        }
    }
}

Victor Martinez

unread,
Jul 28, 2017, 7:22:46 AM7/28/17
to job-dsl-plugin
Hey,

That's outside of the scope of JobDSL since it's basically a global setting which you might be able to script with Groovy. I just found the below reference:


Cheers
Reply all
Reply to author
Forward
0 new messages