use of org.jenkinsci.test.acceptance.controller.RemoteJenkinsController in project acceptance-test-harness by jenkinsci.
the class RemoteJenkinsProvider method createNewJenkinsController.
private JenkinsController createNewJenkinsController() {
Machine machine = machineProvider.get();
try {
// install jenkins WAR
jenkinsResolver.materialize(machine, jenkinsWar);
} catch (Exception e) {
logger.error("Error during setting up Jenkins: " + e.getMessage(), e);
throw new AssertionError(e);
}
String jenkinsHome = machine.dir() + newJenkinsHome() + "/";
String pluginDir = jenkinsHome + "plugins/";
String path = JenkinsResolver.JENKINS_TEMP_DIR + "form-element-path.hpi";
// install form-path-element plugin
new PluginDownloader("form-element-path").materialize(machine, path);
try (Ssh ssh = machine.connect()) {
ssh.executeRemoteCommand("mkdir -p " + pluginDir);
ssh.executeRemoteCommand(String.format("cp %s %s", path, pluginDir));
}
return new RemoteJenkinsController(injector, machine, jenkinsHome, jenkinsWar, privateKeyFile);
}
use of org.jenkinsci.test.acceptance.controller.RemoteJenkinsController in project acceptance-test-harness by jenkinsci.
the class RemoteJenkinsProvider method get.
@Override
public JenkinsController get() {
logger.info("Creating new RemoteJenkinsController...");
JenkinsController jenkinsController = createNewJenkinsController();
try {
cleaner.addTask(jenkinsController);
jenkinsController.start();
} catch (IOException e) {
throw new AssertionError("Failed to start Jenkins: " + e.getMessage(), e);
}
return jenkinsController;
}
Aggregations