use of org.jenkinsci.test.acceptance.resolver.PluginDownloader 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);
}
Aggregations