Re: Usage of Jenkins shared library in Job DSL

2019-08-10 Thread Tomas Bjerre
b.com/tomasbjerre/jenkins-configuration-as-code-sandbox/blob/master/vars/createJobs.groovy#L44 Den fredag 17 augusti 2018 kl. 18:04:56 UTC+2 skrev tre...@gmail.com: > > Hey, > > I am looking for advice how to achieve usage of Jenkins shared library in > Job DSL – > I use th

Re: Usage of Jenkins shared library in Job DSL

2019-08-03 Thread Nick Muzika
hi Philip, It's possible @Grab('org.yaml:snakeyaml:1.17') import org.yaml.snakeyaml.Yaml .. def params = readFileFromWorkspace(param.getPath()) yamlMap = new Yaml().load(params) yamlMap.each { key, value -> } Works for me just use yaml module & groovy. In my case shared libraries

Re: Usage of Jenkins shared library in Job DSL

2018-12-18 Thread Philip Steiner
Thanks for the detailed followup! Lots to digest. It looks like you were having trouble accessing the Shared Library from generated pipeline scripts, which is a little different from my problem: I want to reference YAML data files stored in the Jenkins Shared Library from inside a Job DSL scrip

Re: Usage of Jenkins shared library in Job DSL

2018-12-18 Thread treneva
Well, not exactly. I found a workaround by reworking the entire logic. My landscape is: one master declarative pipeline kicks off multiple child pipeline jobs. Both the master and the child pipelines are instances created out of shared libraries (jobBuilder, pipelineBuilder) and I want to be ab

Re: Usage of Jenkins shared library in Job DSL

2018-12-17 Thread Philip Steiner
Hi tre..., I know this thread is getting old, but did you ever get an answer or figure out how to use a Jenkins Shared Library in the Job DSL script, or some workaround? Thanks Philip -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubs

Re: Usage of Jenkins shared library in Job DSL

2018-08-26 Thread treneva
an add your shared library there. > > On Fri, Aug 17, 2018 at 11:05 > wrote: > >> Hey, >> >> I am looking for advice how to achieve usage of Jenkins shared library in >> Job DSL – >> I use this snipped to seed a job whose functionality is in Jen

Re: Usage of Jenkins shared library in Job DSL

2018-08-26 Thread Jan Monterrubio
Manage Jenkins -> configure system -> global libraries You can add your shared library there. On Fri, Aug 17, 2018 at 11:05 wrote: > Hey, > > I am looking for advice how to achieve usage of Jenkins shared library in > Job DSL – > I use this snipped to seed a job whos

Usage of Jenkins shared library in Job DSL

2018-08-17 Thread treneva
Hey, I am looking for advice how to achieve usage of Jenkins shared library in Job DSL – I use this snipped to seed a job whose functionality is in Jenkins file: job('my-small-test-job') { parameters { stringParam('branch', '${branch}') } removedJobActi