use of com.thoughtworks.go.agent.common.AgentCLI in project gocd by gocd.
the class AgentMain method main.
public static void main(String... argv) throws Exception {
assertVMVersion();
AgentBootstrapperArgs args = new AgentCLI().parse(argv);
LogConfigurator logConfigurator = new LogConfigurator(DEFAULT_LOGBACK_CONFIGURATION_FILE);
logConfigurator.initialize();
new SystemEnvironment().setProperty("go.process.type", "agent");
new SystemEnvironment().setProperty(SystemEnvironment.SERVICE_URL, args.getServerUrl().toString());
new SystemEnvironment().setProperty(SystemEnvironment.AGENT_SSL_VERIFICATION_MODE, args.getSslMode().toString());
if (args.getRootCertFile() != null) {
new SystemEnvironment().setProperty(SystemEnvironment.AGENT_ROOT_CERT_FILE, args.getRootCertFile().toString());
}
ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
ctx.registerShutdownHook();
}
use of com.thoughtworks.go.agent.common.AgentCLI in project gocd by gocd.
the class AgentBootstrapper method main.
public static void main(String[] argv) {
assertVMVersion();
AgentBootstrapperArgs args = new AgentCLI().parse(argv);
new LogConfigurator(DEFAULT_LOGBACK_CONFIGURATION_FILE).runWithLogger(() -> new AgentBootstrapper().go(true, args));
}
Aggregations