git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/dataminer-pool-manager@157810 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
1d7e77a3c2
commit
563f70cfca
|
@ -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 {
|
|||
//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!");
|
||||
|
|
|
@ -13,7 +13,7 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.datamodel.Algorithm;
|
||||
|
||||
import com.jcraft.jsch.Channel;
|
||||
|
@ -78,15 +78,18 @@ public class CheckMethod {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fileWriter.close();
|
||||
return true;
|
||||
|
||||
} catch (Exception a) {
|
||||
a.getMessage();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
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 {
|
|||
// File aa = new File("/home/gcube/wps_algorithms/algorithms/RBLACKBOX_interface.jar");
|
||||
// a.copyFromDmToSVN(aa, "Dev");
|
||||
|
||||
//
|
||||
|
||||
System.out.println(a.checkMethod("dm-pool-manager-proto.d4science.org",
|
||||
"2eceaf27-0e22-4dbe-8075-e09eff199bf9-98187548"));
|
||||
|
||||
//System.out.println(a.checkMethod("dataminer-ghost-t.pre.d4science.org",
|
||||
// "2eceaf27-0e22-4dbe-8075-e09eff199bf9-98187548"));
|
||||
|
||||
//System.out.println(a.checkMethod("dataminer-proto-ghost.d4science.org",
|
||||
// "3a23bfa4-4dfe-44fc-988f-194b91071dd2-843339462"));
|
||||
|
||||
System.out.println(a.checkMethod("dataminer-ghost-d.dev.d4science.org",
|
||||
"708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548"));
|
||||
|
||||
|
||||
//Algorithm aa = new Algorithm();
|
||||
//aa.setName("UDPIPE_WRAPPER");
|
||||
//System.out.println(a.algoExists(aa));
|
||||
////
|
||||
//ServiceConfiguration bp = new ServiceConfiguration();
|
||||
////
|
||||
//SecurityTokenProvider.instance.set("708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548");
|
||||
////
|
||||
//if (a.checkMethod(bp.getStagingHost(), SecurityTokenProvider.instance.get())&&a.algoExists(aa)); {
|
||||
//System.out.println("ciao");
|
||||
//
|
||||
//}
|
||||
|
||||
// Algorithm al = new Algorithm();
|
||||
// al.setName("RBLACKBOX");
|
||||
//
|
||||
//Algorithm al = new Algorithm();
|
||||
// al.setName("UDPIPE_WRAPPER");
|
||||
// a.deleteFiles(al);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -155,9 +155,10 @@ public String getDependencyFileProd(String language/*, String env*/){
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void updateAlgorithmFiles(File a) throws SVNException{
|
||||
//this.updateAlgorithmList(this.configuration.getSVNMainAlgoRepo(), a);
|
||||
|
|
Loading…
Reference in New Issue