|
|
@@ -14,21 +14,27 @@ import java.util.List;
|
|
|
@Slf4j
|
|
|
public class DeployApp {
|
|
|
public static void main(String[] args) {
|
|
|
- if (args.length != 4) {
|
|
|
+ /*if (args.length != 4) {
|
|
|
log.error("usage: java -jar devops-deployer ${app_name} ${local_dir} ${remote_dir} ${sever_file}");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
String appName = args[0];
|
|
|
String localDir = args[1];
|
|
|
+ String remoteDir = args[2];
|
|
|
+ String serverFile = args[3];*/
|
|
|
+
|
|
|
+ String appName = "devops-agent";
|
|
|
+ String localDir = "/home/reghao/code/devops/bnt/agent/bin";
|
|
|
+ String remoteDir = "/opt/app/devops-agent";
|
|
|
+ String serverFile = "/home/reghao/Downloads/servers.csv";
|
|
|
+ //String serverFile = "/home/reghao/Downloads/servers_prod.csv";
|
|
|
+
|
|
|
File file1 = new File(localDir);
|
|
|
if (!file1.exists() || file1.isFile()) {
|
|
|
log.error("local_dir {} is not exist or is a file", localDir);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- String remoteDir = args[2];
|
|
|
- String serverFile = args[3];
|
|
|
File file2 = new File(serverFile);
|
|
|
if (!file2.exists() || file2.isDirectory()) {
|
|
|
log.error("server_file {} is not exist or is a directory", serverFile);
|