Questions tagged [jenkins-job-dsl]

Jenkins Job-DSL is a Jenkins plugin which enables the creation of Jenkins Jobs using Groovy scripts. It's available in the standard Jenkins plugin list.

For command reference see the Job DSL API Viewer.

Example of DSL script:

job('Hello World') {
  description 'A Simple Job'
  scm {
    github 'pdurbin/maven-hello-world'
  }
  steps {
    maven 'package', 'my-app/pom.xml'
  }
  publishers {
    archiveArtifacts 'build/**/jar'
  }
}

Links

844 questions
0
votes
1 answer

Why does the Jenkins Job DSL work with a provided script but fail with a file system script?

I have a groovy script to create the folders for my Jenkins server. The folders plugin is installed and working. I also installed the Job DSL plugin and created the Seed job. There are 2 options for supplying the groovy DSL code. 1. Use the provided…
Matthew MacFarland
  • 2,413
  • 3
  • 26
  • 34
0
votes
1 answer

Manual approval step in a jenkins DSL configured build pipeline

I want a build pipeline to stop after a job and wait for manual click until the pipeline continues, via the DSL. I want to avoid the promotions plug-in due to the spotty/no support via the DSL.
harmingcola
  • 454
  • 6
  • 17
0
votes
1 answer

Syntax for defining MultiJob conditional step in Job DSL plugin

I using Jenkins CI with Job DSL and Multijob plugins. I'm attempting to define a parametrized Multijob containing conditional step using DSL, but I fail to figure out the correct syntax. My code: multiJob("MyJob") { parameters { …
vvv444
  • 2,764
  • 1
  • 14
  • 25
0
votes
1 answer

How to retain Cobertura ratcheted configuration in job-dsl-plugin?

Cobertura plugin in Jenkins has a support of ratcheting by ticking these boxes: Health auto update Stability auto update When ticking this box, the coverage metric targets (in Jenkins configuration page) will be updated on every successful…
ceilfors
  • 2,617
  • 23
  • 33
0
votes
0 answers

Create job for every testsuite using job dsl

I'm using TestNG, Jenkins, and the job-dsl-plugin. I have a lot of TestNG XML testsuites for the tests in my project. What I want is a script that will go through each of these suites and create a job for them. My test suites are formatted like…
michaelsnowden
  • 6,031
  • 2
  • 38
  • 83
0
votes
1 answer

job dsl - sonar using flexible publish plugin

I'm using the job dsl plugin to generate jenkins jobs. I'm running into some problem with the sonar implementation of the job dsl plugin. I'm using the Flexible Publish plugin to provide a conditional to running sonar; i.e. if we find pom.xml in…
Roger Welin
  • 47
  • 1
  • 8
0
votes
1 answer

Authorization access in CloudBees Jenkins

I have requirement where in a folder we have created some jobs and want to give build access to some of the jbos and rest want have read only access. Let me explain it below. Folder – Folder1 – Job1 Job2 Folder2 Job1 …
sstar
  • 33
  • 1
  • 6
0
votes
2 answers

Deliver Pipeline Plugin and its `columns` property does not work

What is the purpose of the columns(int number) of Delivery Pipeline Plugin? According Job DSL Plugin and its view reference document it specifies the number of columns. I have tried changing this setting to different values and I do not see its…
betodelrio
  • 308
  • 2
  • 11
0
votes
1 answer

Using "name" when Configuring Graphite with 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' /…
Glef
  • 363
  • 1
  • 4
  • 12
0
votes
1 answer

How to specify Gradle wrapper with Jenkins JobDSL?

The JobDSL spec currently has: job { steps { gradle('build') } } but that creates a job that errors with: FATAL: Unable to find Gradle Wrapper How does one specify the Gradle wrapper to use? I don't see it documented in…
Noel Yap
  • 18,822
  • 21
  • 92
  • 144
0
votes
1 answer

Is it possible to specify check-out strategy?

Is it possible in Jenkins-dsl to specify the SVN check-out strategy? I would like to use "Use 'svn update' as much as possible", yet the only way I can see to configure this is manually Cheers!
Hamish
  • 1,015
  • 9
  • 20
0
votes
2 answers

ExtendedEmailConfig with job dsl

I am using job dsl to create jenkins jobs. I want to send emails out on job failures. I have already installed and configured 'ext-email' plugin. I have also added following section to my job DSL script extendedEmail('me@halfempty.org', 'Oops',…
Pushkar
  • 541
  • 4
  • 18
0
votes
1 answer

How do I test for a hash being a valid set?

I'm putting together some spock tests for a Jenkins plugin and along the way I want to check the build variables match one of some valid ones. These are coming from a MatrixProject but how do I do that? I have this but it looks a bit clunky but…
KeepCalmAndCarryOn
  • 8,817
  • 2
  • 32
  • 47
0
votes
1 answer

Build steps mavenInstallation in creating job via jenkins-job-dsl

I'm trying to setup a couple of jobs via jenkins-job-dsl v1.20 where i have the following lines: def existingMavenInstallations = [ "Maven 2.0.11", "Maven 2.2.1", "Maven 3.0.5", "Maven 3.1.0", "Maven 3.1.1" ] job { name 'WhatEverName' jdk…
khmarbaise
  • 92,914
  • 28
  • 189
  • 235
0
votes
1 answer

How can I get control of the generation process of config.xml file for a jenkins job?

I'm new to Jenkins and now I'm supposed to develop a jenkins plugin. In the plugin will create a new job type, and generate the configuration page of this job type. I've finish this one by extending the class "hudson.model.Project" ; For now, when…