use of org.jenkinsci.test.acceptance.docker.DockerImage in project acceptance-test-harness by jenkinsci.
the class TSRWinstoneDockerController method startProcess.
@Override
public ProcessInputStream startProcess() throws IOException {
try {
// can't mount symlink very well, so we need to resolve it
File war = this.war.getCanonicalFile();
CommandBuilder opts = new CommandBuilder();
opts.add("-v", getJenkinsHome() + ":/work");
opts.add("-v", war.getParent() + ":/war");
// TODO: unify ID and fixture
DockerImage img;
if (dockerImage != null)
img = new DockerImage(dockerImage);
else
img = docker.build(fixtureType);
container = img.start(fixtureType, opts, null);
CommandBuilder cmds = new CommandBuilder();
cmds.add("java");
cmds.add("-DJENKINS_HOME=/work");
cmds.add("-jar", "/war/" + war.getName());
cmds.add("--ajp13Port=-1", "--controlPort=8081", "--httpPort=8080");
return container.popen(cmds);
} catch (InterruptedException e) {
throw (IOException) new InterruptedIOException("Failed to launch winstone").initCause(e);
}
}
use of org.jenkinsci.test.acceptance.docker.DockerImage in project acceptance-test-harness by jenkinsci.
the class WinstoneDockerController method startProcess.
@Override
public ProcessInputStream startProcess() throws IOException {
try {
// can't mount symlink very well, so we need to resolve it
File war = this.war.getCanonicalFile();
CommandBuilder opts = new CommandBuilder();
opts.add("-v", getJenkinsHome() + ":/work");
opts.add("-v", war.getParent() + ":/war");
// TODO: unify ID and fixture
DockerImage img;
if (dockerImage != null)
img = new DockerImage(dockerImage);
else
img = docker.build(fixtureType);
container = img.start(fixtureType).withOptions(opts).start();
CommandBuilder cmds = new CommandBuilder();
cmds.add("java");
cmds.add("-DJENKINS_HOME=/work");
cmds.add("-Djenkins.formelementpath.FormElementPathPageDecorator.enabled=true");
cmds.add("-jar", "/war/" + war.getName());
cmds.add("--ajp13Port=-1", "--controlPort=8081", "--httpPort=8080");
return container.popen(cmds);
} catch (InterruptedException e) {
throw (IOException) new InterruptedIOException("Failed to launch winstone").initCause(e);
}
}
Aggregations