Skip to content

Commit

Permalink
Removed references to deprecated grails plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
sheehan committed Feb 11, 2018
1 parent 11e0b4d commit ea93492
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 143 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
@@ -1,6 +1,9 @@
## Changes (excluding dependency updates)

### 2017-02-05
### 2018-02-11
* Removed references to deprecated grails plugin.

### 2018-02-05
* Add workaround from [#90](https://github.com/sheehan/job-dsl-gradle-example/issues/90)

### 2017-10-29
Expand Down
11 changes: 4 additions & 7 deletions src/jobs/example1Jobs.groovy
@@ -1,26 +1,23 @@
String basePath = 'example1'
String repo = 'sheehan/grails-example'
String repo = 'sheehan/gradle-example'

folder(basePath) {
description 'This example shows basic folder/job creation.'
}

job("$basePath/grails-example-build") {
job("$basePath/gradle-example-build") {
scm {
github repo
}
triggers {
scm 'H/5 * * * *'
}
steps {
grails {
useWrapper true
targets(['test-app', 'war'])
}
gradle 'assemble'
}
}

job("$basePath/grails-example-deploy") {
job("$basePath/gradle-example-deploy") {
parameters {
stringParam 'host'
}
Expand Down
8 changes: 4 additions & 4 deletions src/jobs/example2Jobs.groovy
@@ -1,7 +1,7 @@
import groovy.json.JsonSlurper

String basePath = 'example2'
String repo = 'sheehan/grails-example'
String repo = 'sheehan/gradle-example'

folder(basePath) {
description 'This example shows how to create a set of jobs for each github branch, each in its own folder.'
Expand All @@ -15,19 +15,19 @@ branches.each { branch ->

folder "$basePath/$safeBranchName"

job("$basePath/$safeBranchName/grails-example-build") {
job("$basePath/$safeBranchName/gradle-example-build") {
scm {
github repo, branch.name
}
triggers {
scm 'H/30 * * * *'
}
steps {
grails 'test-app war', true
gradle 'assemble'
}
}

job("$basePath/$safeBranchName/grails-example-deploy") {
job("$basePath/$safeBranchName/gradle-example-deploy") {
parameters {
stringParam 'host'
}
Expand Down
2 changes: 1 addition & 1 deletion src/jobs/example3Jobs.groovy
Expand Up @@ -15,7 +15,7 @@ job("$basePath/configure-block-example") {
}

steps {
grails 'test war'
gradle 'assemble'
}

configure { Node project ->
Expand Down
2 changes: 1 addition & 1 deletion src/jobs/example4Jobs.groovy
Expand Up @@ -20,7 +20,7 @@ folder(basePath) {
scm 'H/5 * * * *'
}
steps {
grails 'test war'
gradle 'assemble'
}
publishers {
if (config.email) {
Expand Down
20 changes: 6 additions & 14 deletions src/jobs/example7Jobs.groovy
@@ -1,5 +1,4 @@
import com.dslexample.builder.GradleCiJobBuilder
import com.dslexample.builder.GrailsCiJobBuilder

String basePath = 'example7'
List developers = ['dev1@example.com', 'dev2@example.com']
Expand All @@ -8,23 +7,16 @@ folder(basePath) {
description 'This example shows how to create jobs using Job builders.'
}

new GrailsCiJobBuilder()
.name("$basePath/grails-project1")
.description('An example using a job builder for a Grails project.')
new GradleCiJobBuilder()
.name("$basePath/gradle-project1")
.description('An example using a job builder for a Gradle project.')
.ownerAndProject('myorg/project1')
.emails(developers)
.build(this)

new GrailsCiJobBuilder()
.name("$basePath/grails-project2")
.description('Another example using a job builder for a Grails project.')
new GradleCiJobBuilder()
.name("$basePath/gradle-project2")
.description('Another example using a job builder for a Gradle project.')
.ownerAndProject('myorg/project2')
.emails(developers)
.build(this)

new GradleCiJobBuilder()
.name("$basePath/gradle-project1")
.description('Example job description')
.ownerAndProject('myorg/project3')
.tasks('clean test')
.build(this)
9 changes: 3 additions & 6 deletions src/jobs/example8Jobs.groovy
@@ -1,11 +1,11 @@
String basePath = 'example8'
String repo = 'sheehan/grails-example'
String repo = 'sheehan/gradle-example'

folder(basePath) {
description 'This example shows how to use DSL extensions provided by other plugins.'
}

job("$basePath/grails-example-build") {
job("$basePath/gradle-example-build") {
scm {
git {
remote {
Expand All @@ -23,9 +23,6 @@ job("$basePath/grails-example-build") {
}
}
steps {
grails {
useWrapper true
targets(['test-app', 'war'])
}
gradle 'assemble'
}
}
9 changes: 3 additions & 6 deletions src/jobs/example9Jobs.groovy
Expand Up @@ -5,7 +5,7 @@ folder(basePath) {
description 'This example shows how to use the automatically generated DSL provided by other plugins.'
}

job("$basePath/grails-legacy-build") {
job("$basePath/gradle-legacy-build") {
scm {
cvsscm { // <-- NOTE: provided by testPlugins dependency in build.gradle
repositories {
Expand All @@ -19,7 +19,7 @@ job("$basePath/grails-legacy-build") {
cvsRepositoryItem {
modules {
cvsModule {
remoteName 'sheehan/grails-example'
remoteName 'sheehan/gradle-example'
localName '.'
projectsetFileName null
}
Expand All @@ -45,10 +45,7 @@ job("$basePath/grails-legacy-build") {
scm('H/5 * * * *')
}
steps {
grails {
useWrapper true
targets(['test-app', 'war'])
}
gradle 'assemble'
}
}

Expand Down
54 changes: 0 additions & 54 deletions src/main/groovy/com/dslexample/builder/GrailsCiJobBuilder.groovy

This file was deleted.

This file was deleted.

0 comments on commit ea93492

Please sign in to comment.