Skip to content

Commit

Permalink
Disabling deactivated, because jobdsl does not change it per pipeline…
Browse files Browse the repository at this point in the history
… job
  • Loading branch information
Joerg Flade committed May 13, 2020
1 parent 407d78e commit 490bafc
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ The structure of the JSON looks like described in the example on buttom.
| --- | --- | --- | --- |
| `multiBranchJobs` | array | *none* | main element for multibranch jobs. It contains a list of multibranch objects, which are defining the jobs. |
| `pipelineJobs` | array | *none* | main element for pipeline jobs. It contains a list of pipelineJob objects, which are defining the jobs. |
| `disabled` | boolean | *PipelineJob* | Disable a pipeline job. `Default:false`) |
| `jobName` | string | *MultibranchJob* or *PipelineJob* | defines the name of the job. (`required`) |
| `jobDescription` | string | *MultibranchJob* or *PipelineJob* | defines the description of the job, which will be shown in Jenkins. |
| `view` | string | *MultibranchJob* or *PipelineJob* | defines the view in which the job will be shown in Jenkins. |
Expand Down Expand Up @@ -104,7 +103,6 @@ The structure of the JSON looks like described in the example on buttom.
],
"pipelineJobs": [
{
"disabled": false,
"jobName": "myPipelineJob",
"jobDescription": "This is a test job",
"pipelineScriptPath": "Jenkinsfile.groovy",
Expand Down
1 change: 0 additions & 1 deletion src/JenkinsJobDslRemote.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ void createPipelineJob(final PipelineJobModel pipelineJobModel) {
println("[INFO] creating pipeline job (${pipelineJobModel.getJobName()})...")
pipelineJob(pipelineJobModel.getJobName()) {
description(pipelineJobModel.getJobDescription())
(pipelineJobModel.getDisabled() != null && pipelineJobModel.getDisabled()) ? disabled(true) : disabled(false)
triggers {
(pipelineJobModel.getGit().getRepositoryTrigger() != null) ? scm(pipelineJobModel.getGit().getRepositoryTrigger()) : ""
(pipelineJobModel.getCronTrigger() != null) ? cron(pipelineJobModel.getCronTrigger()) : ""
Expand Down
1 change: 0 additions & 1 deletion src/examples/jenkins-jobdsl-jobs.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
],
"pipelineJobs": [
{
"disabled": false,
"jobName": "myPipelineJob",
"jobDescription": "This is a test job",
"pipelineScriptPath": "Jenkinsfile.groovy",
Expand Down
4 changes: 0 additions & 4 deletions src/model/BaseJobDslPipelineModel.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import groovy.transform.ToString

@ToString(includeNames = true, includeFields = true, ignoreNulls = true)
class BaseJobDslPipelineModel {
/**
* Is this job disabled (optional; default: false)
*/
String disabled = false
/**
* Name of the job (mandatory)
*/
Expand Down

0 comments on commit 490bafc

Please sign in to comment.