forked from mibexsoftware/bamboo-plan-dsl-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMaven3TaskSpec.groovy
37 lines (31 loc) · 1.19 KB
/
Maven3TaskSpec.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package ch.mibex.bamboo.plandsl.dsl.tasks
import ch.mibex.bamboo.plandsl.dsl.DslScriptContext
import ch.mibex.bamboo.plandsl.dsl.DslScriptParserImpl
import spock.lang.Specification
class Maven3TaskSpec extends Specification {
def 'Maven 3 task'() {
setup:
def loader = new DslScriptParserImpl()
def dsl = getClass().getResource('/dsls/tasks/Maven3Task.groovy').text
when:
def results = loader.parse(new DslScriptContext(dsl))
then:
results.projects[0].plans[0].stages[0].jobs[0].tasks.tasks[0] == new Maven3Task(
enabled: true,
isFinal: false,
description: "build plug-in",
goal: "install",
environmentVariables: "what=EVER",
workingSubDirectory: ".",
buildJdk: "jdk8",
executable: "maven323",
pluginKey: "com.atlassian.bamboo.plugins.maven:task.builder.mvn3",
hasTests: true,
withTests: new WithTests(
testResultsDirectory: "tests/"
),
useMavenReturnCode: false,
projectFile: "a/b"
)
}
}