use of org.jenkinsci.test.acceptance.plugins.groovy.GroovyStep in project acceptance-test-harness by jenkinsci.
the class GroovyPluginTest method createDefaultGroovyBuildStep.
private GroovyStep createDefaultGroovyBuildStep() {
GroovyStep groovyStep = job.addBuildStep(GroovyStep.class);
groovyStep.version.select(GroovyInstallation.DEFAULT_GROOVY_ID);
return groovyStep;
}
use of org.jenkinsci.test.acceptance.plugins.groovy.GroovyStep in project acceptance-test-harness by jenkinsci.
the class GroovyPluginTest method use_custom_groovy_version.
@Test
public void use_custom_groovy_version() {
GroovyInstallation.installGroovy(jenkins, "groovy-2.2.1", "Groovy 2.2.1");
configureJob();
final GroovyStep step = job.addBuildStep(GroovyStep.class);
step.version.select("groovy-2.2.1");
step.script("println 'version: ' + groovy.lang.GroovySystem.getVersion()");
job.save();
shouldReport("version: 2.2.1");
}
use of org.jenkinsci.test.acceptance.plugins.groovy.GroovyStep in project acceptance-test-harness by jenkinsci.
the class GroovyPluginTest method use_native_groovy.
@Test
@Native("groovy")
public void use_native_groovy() {
GroovyInstallation groovy = ToolInstallation.addTool(jenkins, GroovyInstallation.class);
groovy.name.set("local-groovy");
groovy.useNative();
groovy.getPage().save();
configureJob();
final GroovyStep step = job.addBuildStep(GroovyStep.class);
step.version.select("local-groovy");
step.script("println 'version: ' + groovy.lang.GroovySystem.getVersion()");
job.save();
Build build = job.startBuild().shouldSucceed();
String expectedVersion = localGroovyVersion();
build.shouldContainsConsoleOutput("version: " + expectedVersion);
}
Aggregations