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
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
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
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
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
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
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
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