FAQ Database Discussion Community


Using “name” when Configuring Graphite with Jenkins Job DSL

groovy,jenkins-plugins,jenkins-job-dsl
I'm trying to configure the Graphite integration plugin for my jobs using Jenkins Job DSL. My block looks like this: coreJobs = [my jobs here] coreJobs.each{ a -> // some extra job config here job("$a") { project / 'publishers' / 'org.jenkinsci.plugins.graphiteIntegrator.GraphitePublisher' { selectedIp '192.123.1.456' metrics { 'org.jenkinsci.plugins.graphiteIntegrator.Metric' { queueName ".${a}.BuildFailed"...

Configure Jenkin's SonarQube section using Job-DSL

groovy,jenkins,sonarqube,jenkins-job-dsl
Using Job-DSL we can configure a C# project in Jenkins. The SonarQube tasks is giving us a hard time. StepContext.metaClass.sonar = { -> NodeBuilder nodeBuilder = new NodeBuilder() stepNodes << nodeBuilder.'hudson.plugins.sonar.SonarRunnerBuilder' { jdk('(Inherit From Job)') usePrivateRepository(false) } } How to set the path to the sonar-project.properties config file, using the...

How to add upstream job in Jenkins DSL

jenkins,jenkins-job-dsl
I can make a downstream job with the DSL plugin for Jenkins: https://github.com/jenkinsci/job-dsl-plugin/wiki/Job-reference#downstream How can I make an upstream job (same thing...just specified in a difference place)? In the UI, it's under Triggers: "Build after other projects are built"....

How to trigger build using Job-DSL

git,bitbucket,jenkins-job-dsl
How to trigger build when push is done on BitBucket, using Job-DSL? I think it is something like that, but with BitBucket, not GitHub... triggers{ githubPush() } I am also looking for a "pull" behavior, with Jenkins looking every N minutes if there is someting new on BitBucket....

using classes in jenkins job dsl

groovy,jenkins,jenkins-job-dsl
Hi all I have a problem and I can't seem to figure it out. So I'm creating some helper classes for my dsl to use, but it just does not seem to execute any method within these classes. I have created a job with the following dsl in it: class...

Using Jenkins Job-DSL Configure block to place custom steps in particular positions

groovy,jenkins,jenkins-job-dsl
Using the job-dsl-plugin I am attempting to script the configuration of a fair number of Jenkins jobs which have previously been configured manually. One flavour of these jobs has multiple steps including a couple which use the XShell plugin, this is not directly supported by job-dsl. However I should be...