This commit is contained in:
Nunzio Andrea Galante 2017-10-27 21:30:20 +00:00
parent f00127bc61
commit 56c111f010
3 changed files with 36 additions and 11 deletions

View File

@ -85,7 +85,7 @@ public class StagingJob extends DMPMJob ***REMOVED***
b.deleteFiles(this.algorithm/*, env*/);;
int ret = this.executeAnsibleWorker(createWorker(this.algorithm, this.stagingCluster, false, "root"));
System.out.println("Return code= "+ret);
if (ret != 0) ***REMOVED***
this.getStatus(2);
@ -100,7 +100,7 @@ public class StagingJob extends DMPMJob ***REMOVED***
***REMOVED***System.out.println("2 - Checking existing in env: "+ this.env);
if (b.checkMethod(a.getStagingHost(), SecurityTokenProvider.instance.get())&&(b.algoExists(this.algorithm/*, env*/))) ***REMOVED***
if (b.checkMethod(a.getStagingHost(), SecurityTokenProvider.instance.get())&&(b.algoExists(this.algorithm))) ***REMOVED***
System.out.println("Interface check ok!");
System.out.println("Both the files exist at the correct path!");

View File

@ -13,7 +13,7 @@ import java.util.LinkedList;
***REMOVED***
import java.util.Vector;
***REMOVED***
***REMOVED***
import com.jcraft.jsch.Channel;
@ -78,15 +78,18 @@ public class CheckMethod ***REMOVED***
***REMOVED***
***REMOVED***
***REMOVED***
fileWriter.close();
return true;
***REMOVED*** catch (Exception a) ***REMOVED***
a.getMessage();
return false;
***REMOVED***
return true;
***REMOVED***
public boolean algoExists(Algorithm a/*, String env*/) throws Exception***REMOVED***
ServiceConfiguration p = new ServiceConfiguration();
@ -101,6 +104,7 @@ public class CheckMethod ***REMOVED***
if ((this.doesExist(file.getPath()/*,env*/)) && (this.doesExist(file2.getPath()/*,env*/)))***REMOVED***
this.copyFromDmToSVN(file/*,env*/);
this.copyFromDmToSVN(file2/*,env*/);
System.out.println("Files have been copied to SVN");
return true;
@ -474,20 +478,40 @@ public class CheckMethod ***REMOVED***
***REMOVED*** File aa = new File("/home/gcube/wps_algorithms/algorithms/RBLACKBOX_interface.jar");
***REMOVED*** a.copyFromDmToSVN(aa, "Dev");
System.out.println(a.checkMethod("dm-pool-manager-proto.d4science.org",
"2eceaf27-0e22-4dbe-8075-e09eff199bf9-98187548"));
***REMOVED***
***REMOVED***System.out.println(a.checkMethod("dataminer-ghost-t.pre.d4science.org",
***REMOVED*** "2eceaf27-0e22-4dbe-8075-e09eff199bf9-98187548"));
***REMOVED*** Algorithm al = new Algorithm();
***REMOVED*** al.setName("RBLACKBOX");
***REMOVED***System.out.println(a.checkMethod("dataminer-proto-ghost.d4science.org",
***REMOVED*** "***REMOVED***"));
System.out.println(a.checkMethod("dataminer-ghost-d.dev.d4science.org",
"***REMOVED***"));
***REMOVED***Algorithm aa = new Algorithm();
***REMOVED***aa.setName("UDPIPE_WRAPPER");
***REMOVED***System.out.println(a.algoExists(aa));
***REMOVED******REMOVED***
***REMOVED***ServiceConfiguration bp = new ServiceConfiguration();
***REMOVED******REMOVED***
***REMOVED***SecurityTokenProvider.instance.set("***REMOVED***");
***REMOVED******REMOVED***
***REMOVED***if (a.checkMethod(bp.getStagingHost(), SecurityTokenProvider.instance.get())&&a.algoExists(aa)); ***REMOVED***
***REMOVED***System.out.println("ciao");
***REMOVED***
***REMOVED******REMOVED***
***REMOVED***
***REMOVED***Algorithm al = new Algorithm();
***REMOVED*** al.setName("UDPIPE_WRAPPER");
***REMOVED*** a.deleteFiles(al);
***REMOVED***
***REMOVED***

View File

@ -155,10 +155,11 @@ public String getDependencyFileProd(String language/*, String env*/)***REMOVED**
***REMOVED***
public void updateSVNProdAlgorithmList(Algorithm algorithm, String targetVRE, String category, String algorithm_type, String user/*, String env*/) ***REMOVED***
this.updateSVNAlgorithmList(this.configuration.getSVNProdAlgorithmsList(), algorithm, targetVRE, category, algorithm_type, user);
this.updateSVNAlgorithmList(this.configuration.getSVNProdAlgorithmsList(), algorithm, targetVRE, category, algorithm_type, user);
***REMOVED***
public void updateAlgorithmFiles(File a) throws SVNException***REMOVED***
***REMOVED***this.updateAlgorithmList(this.configuration.getSVNMainAlgoRepo(), a);
this.updateAlgorithmList(this.configuration.getStageRepository(), a);