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

View File

@ -85,7 +85,7 @@ public class StagingJob extends DMPMJob {
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) {
this.getStatus(2);
@ -100,7 +100,7 @@ public class StagingJob extends DMPMJob {
***REMOVED***System.out.println("2 - Checking existing in env: "+ this.env);
if (b.checkMethod(a.getStagingHost(), SecurityTokenProvider.instance.get())&&(b.algoExists(this.algorithm/*, env*/))) {
if (b.checkMethod(a.getStagingHost(), SecurityTokenProvider.instance.get())&&(b.algoExists(this.algorithm))) {
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.Arrays;
***REMOVED***
import java.util.Vector;
***REMOVED***
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
import com.jcraft.jsch.Channel;
@ -78,15 +78,18 @@ public class CheckMethod {
***REMOVED***
***REMOVED***
***REMOVED***
fileWriter.close();
return true;
***REMOVED*** catch (Exception a) {
a.getMessage();
return false;
***REMOVED***
return true;
***REMOVED***
public boolean algoExists(Algorithm a/*, String env*/) throws Exception{
ServiceConfiguration p = new ServiceConfiguration();
@ -101,6 +104,7 @@ public class CheckMethod {
if ((this.doesExist(file.getPath()/*,env*/)) && (this.doesExist(file2.getPath()/*,env*/))){
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*** File aa = new File("/home/gcube/wps_algorithms/algorithms/RBLACKBOX_interface.jar");
***REMOVED*** a.copyFromDmToSVN(aa, "Dev");
***REMOVED***
System.out.println(a.checkMethod("dm-pool-manager-proto.d4science.org",
"2eceaf27-0e22-4dbe-8075-e09eff199bf9-98187548"));
***REMOVED***System.out.println(a.checkMethod("dataminer-ghost-t.pre.d4science.org",
***REMOVED*** "2eceaf27-0e22-4dbe-8075-e09eff199bf9-98187548"));
***REMOVED***System.out.println(a.checkMethod("dataminer-proto-ghost.d4science.org",
***REMOVED*** "3a23bfa4-4dfe-44fc-988f-194b91071dd2-843339462"));
System.out.println(a.checkMethod("dataminer-ghost-d.dev.d4science.org",
"708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548"));
***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("708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548");
***REMOVED******REMOVED***
***REMOVED***if (a.checkMethod(bp.getStagingHost(), SecurityTokenProvider.instance.get())&&a.algoExists(aa)); {
***REMOVED***System.out.println("ciao");
***REMOVED***
***REMOVED******REMOVED***
***REMOVED*** Algorithm al = new Algorithm();
***REMOVED*** al.setName("RBLACKBOX");
***REMOVED***
***REMOVED***Algorithm al = new Algorithm();
***REMOVED*** al.setName("UDPIPE_WRAPPER");
***REMOVED*** a.deleteFiles(al);
***REMOVED***
***REMOVED***

View File

@ -155,9 +155,10 @@ public String getDependencyFileProd(String language/*, String env*/){
***REMOVED***
public void updateSVNProdAlgorithmList(Algorithm algorithm, String targetVRE, String category, String algorithm_type, String user/*, String env*/) {
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***this.updateAlgorithmList(this.configuration.getSVNMainAlgoRepo(), a);