Skip to content

Commit e00ba4e

Browse files
committed
Merged #13 in, now supporting github webhooks and failing the pipeline as soon as a stage fails
2 parents 4c685ca + b10c52c commit e00ba4e

File tree

117 files changed

+1354
-271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+1354
-271
lines changed

build.gradle

Lines changed: 38 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,46 @@
1-
apply plugin: 'groovy'
2-
apply plugin: 'application'
3-
apply plugin: 'idea'
4-
apply from: 'gradle/cucumber.gradle'
1+
apply from: script('requireJavaVersion7')
2+
apply from: script('dependencies')
3+
apply plugin: 'distribution'
54

6-
repositories {
7-
mavenCentral()
8-
}
5+
description = 'Pipeline --the Continuous Delivery (CD) tool, which we and all stakeholders of the CD pipeline love to use'
6+
group = 'org.pipelinelabs.pipeline'
7+
version = '0.1.0'
98

10-
ext {
11-
libs = [
12-
'maven-shared-utils': 'org.apache.maven.shared:maven-shared-utils:0.3',
13-
groovy: 'org.codehaus.groovy:groovy:2.1.6:indy',
14-
hamcrest: 'org.hamcrest:hamcrest-library:1.3',
15-
jcommander: 'com.beust:jcommander:1.30',
16-
spock: 'org.spockframework:spock-core:0.7-groovy-2.0',
17-
mail: 'javax.mail:mail:1.4.7',
18-
'spring-context-support':'org.springframework:spring-context-support:3.2.4.RELEASE'
19-
]
9+
allprojects {
10+
repositories {
11+
mavenCentral()
12+
}
2013
}
2114

22-
dependencies {
23-
compile libs.groovy
24-
compile libs.jcommander
25-
compile libs.'maven-shared-utils'
26-
compile libs.'spring-context-support'
27-
compile libs.mail
15+
subprojects {
16+
group = createProjectGroupId(rootProject, it)
17+
version = rootProject.version
18+
}
2819

29-
testCompile(libs.spock) {
30-
exclude group: 'org.codehaus.groovy', module: 'groovy-all'
31-
exclude group: 'junit', module: 'junit-dep'
20+
distributions {
21+
main {
22+
contents {
23+
into('bin') {
24+
from { project(':listener').startScripts.outputs.files }
25+
from { project(':runner').startScripts.outputs.files }
26+
fileMode = 0755
27+
}
28+
into('lib') {
29+
def libs = []
30+
libs << project(':listener').configurations.runtime - project(':runner').configurations.runtime
31+
libs << project(':runner').configurations.runtime
32+
from libs
33+
from project(':listener').jar
34+
from project(':runner').jar
35+
}
36+
}
3237
}
33-
testCompile libs.hamcrest
3438
}
3539

36-
applicationName = 'pipe'
37-
mainClassName = 'org.pipelinelabs.pipeline.cli.Pipeline'
40+
String createProjectGroupId(Project root, Project project) {
41+
root.group << '.' << project.name.replaceAll('-', '.')
42+
}
43+
44+
File script(String name) {
45+
project.file("gradle/${name}.gradle")
46+
}

gradle.properties

Lines changed: 0 additions & 11 deletions
This file was deleted.

gradle/cucumber.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ configurations {
66

77
dependencies {
88
testCompile group: 'info.cukes', name: 'cucumber-groovy', version: '1.1.2'
9-
testCompile group: 'info.cukes', name: 'cucumber-junit', version: '1.1.2'
9+
testCompile group: 'info.cukes', name: 'cucumber-junit', version: '1.1.2', {
10+
exclude group: 'junit', module: 'junit'
11+
}
1012

1113
cucumberRuntime files("${jar.archivePath}")
1214
}

gradle/dependencies.gradle

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
ext {
2+
libraries = [:]
3+
versions = [:]
4+
}
5+
6+
versions += [
7+
groovy: '2.1.7',
8+
dropwizard: '0.6.2',
9+
]
10+
11+
libraries += [
12+
mavenSharedUtils: 'org.apache.maven.shared:maven-shared-utils:0.4',
13+
groovy: "org.codehaus.groovy:groovy:${versions.groovy}",
14+
groovyJson: "org.codehaus.groovy:groovy-json:${versions.groovy}",
15+
mail: 'javax.mail:mail:1.4.7',
16+
springContextSupport: 'org.springframework:spring-context-support:3.2.4.RELEASE',
17+
18+
junit: 'junit:junit:4.11',
19+
asm: 'org.ow2.asm:asm:4.1',
20+
hamcrest: 'org.hamcrest:hamcrest-library:1.3',
21+
jcommander: 'com.beust:jcommander:1.32',
22+
dropwizardTesting: "com.yammer.dropwizard:dropwizard-testing:${versions.dropwizard}",
23+
]
24+
25+
libraries.dropwizard = ["com.yammer.dropwizard:dropwizard-core:${versions.dropwizard}",
26+
'com.sun.jersey:jersey-client:1.17.1',
27+
]
28+
29+
libraries.spock = ['org.spockframework:spock-core:0.7-groovy-2.0',
30+
libraries.groovy,
31+
'org.objenesis:objenesis:2.0',
32+
'cglib:cglib-nodep:2.2'
33+
]
34+
35+
allprojects {
36+
configurations.all {
37+
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
38+
def req = details.requested
39+
// Replace groovy-all with groovy
40+
if (req.name == 'groovy-all' || req.name == 'groovy') {
41+
details.useTarget libraries.groovy
42+
}
43+
// Replace junit-dep with junit
44+
if (req.name == 'junit-dep') {
45+
details.useTarget libraries.junit
46+
}
47+
// Change old groupId of asm to new groupId, for correct dependency handling
48+
if (req.group == 'asm') {
49+
details.useTarget group: 'org.ow2.asm', name: req.name, version: req.version
50+
}
51+
}
52+
}
53+
}

gradle/requireJavaVersion7.gradle

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import static org.gradle.api.JavaVersion.VERSION_1_7
2+
3+
if (!JavaVersion.current().isJava7()) {
4+
throw new RequireJava7CompatibleJavaVersion()
5+
}
6+
7+
subprojects {
8+
apply plugin: 'java'
9+
10+
sourceCompatibility = VERSION_1_7
11+
targetCompatibility = VERSION_1_7
12+
13+
test {
14+
testLogging {
15+
exceptionFormat = 'full'
16+
}
17+
}
18+
}
19+
20+
class RequireJava7CompatibleJavaVersion extends RuntimeException {
21+
@Override
22+
String getMessage() {
23+
final msg = "This project requires Java 7 or higher, you're running version '%s'"
24+
return String.format(msg, JavaVersion.current())
25+
}
26+
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=http\://services.gradle.org/distributions/gradle-1.7-bin.zip
6+
distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
File renamed without changes.

settings.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1+
include 'runner'
2+
include 'listener'
3+
14
rootProject.name = 'pipeline'
5+
rootProject.children.each { project ->
6+
String fileBaseName = project.name
7+
String projectDirName = "subprojects/$fileBaseName"
8+
project.projectDir = new File(settingsDir, projectDirName)
9+
project.buildFileName = "${fileBaseName}.gradle"
10+
assert project.projectDir.isDirectory()
11+
assert project.buildFile.isFile()
12+
}

src/main/groovy/org/pipelinelabs/pipeline/api/Task.java

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/main/groovy/org/pipelinelabs/pipeline/api/task/ShellCommand.java

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)