This commit is contained in:
Nunzio Andrea Galante 2017-09-20 16:51:21 +00:00
parent 17c944b4de
commit a951066ac8
10 changed files with 584 additions and 413 deletions

View File

@ -42,7 +42,7 @@ public class RestPoolManager implements PoolManager {
private DataminerPoolManager service = new DataminerPoolManager();
***REMOVED***@Context
private ApplicationContext context = ContextProvider.get();
***REMOVED***private ApplicationContext context = ContextProvider.get();
@ -55,8 +55,8 @@ public class RestPoolManager implements PoolManager {
@QueryParam("category") String category,
@QueryParam("algorithm_type") String algorithm_type) throws IOException, InterruptedException {
Algorithm algo = AlgorithmBuilder.create(algorithmPackageURL);
String env = context.application().getInitParameter("Environment");
return this.service.stageAlgorithm(algo,targetVRE,category,algorithm_type,env);
***REMOVED***String env = context.application().getInitParameter("Environment");
return this.service.stageAlgorithm(algo,targetVRE,category,algorithm_type/*,env*/);
***REMOVED***
@ -70,8 +70,8 @@ public class RestPoolManager implements PoolManager {
@QueryParam("category") String category,
@QueryParam("algorithm_type") String algorithm_type) throws IOException, InterruptedException {
Algorithm algo = AlgorithmBuilder.create(algorithmPackageURL);
String env = context.application().getInitParameter("Environment");
return this.service.publishAlgorithm(algo, /*targetVREToken,*/ targetVRE,category,algorithm_type,env);
***REMOVED***String env = context.application().getInitParameter("Environment");
return this.service.publishAlgorithm(algo, /*targetVREToken,*/ targetVRE,category,algorithm_type/*,env*/);
***REMOVED***
/*

View File

@ -28,23 +28,23 @@ public class DataminerPoolManager {
***REMOVED***
public String stageAlgorithm(Algorithm algo,String targetVRE, String category, String algorithm_type,String env) throws IOException, InterruptedException {
public String stageAlgorithm(Algorithm algo,String targetVRE, String category, String algorithm_type/*,String env*/) throws IOException, InterruptedException {
Cluster stagingCluster = ClusterBuilder.getStagingDataminerCluster(env);
Cluster stagingCluster = ClusterBuilder.getStagingDataminerCluster();
***REMOVED***Cluster rProtoCluster = ClusterBuilder.getRProtoCluster();
DMPMJob job = new StagingJob(this.svnUpdater, algo, stagingCluster, /*rProtoCluster,*/ targetVRE, category, algorithm_type,env);
DMPMJob job = new StagingJob(this.svnUpdater, algo, stagingCluster, /*rProtoCluster,*/ targetVRE, category, algorithm_type/*,env*/);
String id = job.start();
return id;
***REMOVED***
public String publishAlgorithm(Algorithm algo, String targetVRE, String category, String algorithm_type, String env) throws IOException, InterruptedException {
public String publishAlgorithm(Algorithm algo, String targetVRE, String category, String algorithm_type/*, String env*/) throws IOException, InterruptedException {
***REMOVED***Cluster prodCluster = ClusterBuilder.getVRECluster(targetVREToken, targetVRE);
DMPMJob job = new ProductionPublishingJob(this.svnUpdater, algo, /*prodCluster,*/ targetVRE, category, algorithm_type,env);
DMPMJob job = new ProductionPublishingJob(this.svnUpdater, algo, /*prodCluster,*/ targetVRE, category, algorithm_type/*,env*/);
String id = job.start();
return id;
***REMOVED***

View File

@ -22,11 +22,11 @@ public class ProductionPublishingJob extends DMPMJob {
private String category;
private String algorithm_type;
***REMOVED***private String targetVREToken;
private String env;
***REMOVED***private String env;
public ProductionPublishingJob(SVNUpdater svnUpdater, Algorithm algorithm,
/*Cluster prodCluster,*/ String targetVREName, String category,String algorithm_type, String env) throws FileNotFoundException, UnsupportedEncodingException {
/*Cluster prodCluster,*/ String targetVREName, String category,String algorithm_type/*, String env*/) throws FileNotFoundException, UnsupportedEncodingException {
super(svnUpdater);
this.algorithm = algorithm;
***REMOVED***this.prodCluster = prodCluster;
@ -34,7 +34,7 @@ public class ProductionPublishingJob extends DMPMJob {
this.category = category;
this.algorithm_type = algorithm_type;
***REMOVED***this.targetVREToken = targetVREToken;
this.env= env;
***REMOVED***this.env= env;
this.jobLogs = new File(System.getProperty("user.home") + File.separator + "dataminer-pool-manager" + File.separator + "jobs");
@ -50,7 +50,7 @@ public class ProductionPublishingJob extends DMPMJob {
***REMOVED***if (CheckPermission.apply(targetVREToken,targetVREName)){
***REMOVED***this.svnUpdater.updateProdDeps(this.algorithm);
this.svnUpdater.updateSVNAlgorithmList(this.algorithm, this.targetVREName, this.category,this.algorithm_type, this.algorithm.getFullname(), env);
this.svnUpdater.updateSVNProdAlgorithmList(this.algorithm, this.targetVREName, this.category,this.algorithm_type, this.algorithm.getFullname()/*, env*/);
this.getStatus(9);
sm.sendNotification(nh.getSuccessSubjectRelease() + " for "+this.algorithm.getName()+ " algorithm", nh.getSuccessBodyRelease("\n\n"+this.buildInfo()));
return;

View File

@ -27,14 +27,14 @@ public class StagingJob extends DMPMJob {
private Cluster stagingCluster;
***REMOVED*** private Cluster rProtoCluster;
private String rProtoVREName;
private String env;
***REMOVED***private String env;
private String category;
private String algorithm_type;
public StagingJob(SVNUpdater svnUpdater, Algorithm algorithm,
Cluster stagingCluster, /* Cluster rProtoCluster, */
String rProtoVREName, String category, String algorithm_type, String env) throws FileNotFoundException, UnsupportedEncodingException {
String rProtoVREName, String category, String algorithm_type/*, String env*/) throws FileNotFoundException, UnsupportedEncodingException {
super(svnUpdater);
this.jobLogs = new File(
System.getProperty("user.home") + File.separator + "dataminer-pool-manager" + File.separator + "jobs");
@ -44,7 +44,7 @@ public class StagingJob extends DMPMJob {
this.stagingCluster = stagingCluster;
***REMOVED*** this.rProtoCluster = rProtoCluster;
this.rProtoVREName = rProtoVREName;
this.env = env;
***REMOVED***this.env = env;
this.category = category;
this.algorithm_type = algorithm_type;
@ -66,7 +66,7 @@ public class StagingJob extends DMPMJob {
try {
Collection<String> undefinedDependencies = this.svnUpdater.getUndefinedDependencies(
this.svnUpdater.getDependencyFile(this.algorithm.getLanguage(),env),
this.svnUpdater.getDependencyFile(this.algorithm.getLanguage()/*,env*/),
this.algorithm.getDependencies());
if (!undefinedDependencies.isEmpty()) {
@ -82,7 +82,7 @@ public class StagingJob extends DMPMJob {
***REMOVED***
***REMOVED***before the installation to check if the files exist
b.deleteFiles(this.algorithm, env);;
b.deleteFiles(this.algorithm/*, env*/);;
int ret = this.executeAnsibleWorker(createWorker(this.algorithm, this.stagingCluster, false, "root"));
@ -95,18 +95,18 @@ public class StagingJob extends DMPMJob {
if (ret == 0) {
this.getStatus(0);
System.out.println("1 - Checking existing in env: "+ env);
***REMOVED***System.out.println("1 - Checking existing in env: "+ env);
System.out.println("2 - Checking existing in env: "+ this.env);
***REMOVED***System.out.println("2 - Checking existing in env: "+ this.env);
if (b.checkMethod(a.getHost(env), SecurityTokenProvider.instance.get())&&(b.algoExists(this.algorithm, env))) {
if (b.checkMethod(a.getStagingHost(), SecurityTokenProvider.instance.get())&&(b.algoExists(this.algorithm/*, env*/))) {
System.out.println("Interface check ok!");
System.out.println("Both the files exist at the correct path!");
this.svnUpdater.updateSVNAlgorithmList(this.algorithm, this.rProtoVREName,this.category, this.algorithm_type,
this.algorithm.getFullname(), env);
this.svnUpdater.updateSVNStagingAlgorithmList(this.algorithm, this.rProtoVREName,this.category, this.algorithm_type,
this.algorithm.getFullname()/*, env*/);
this.getStatus(9);
sm.sendNotification(nh.getSuccessSubject() + " for "+this.algorithm.getName()+ " algorithm", nh.getSuccessBody("\n\n"+this.buildInfo()));
@ -163,7 +163,7 @@ public class StagingJob extends DMPMJob {
"Algorithm details:\n"+"\n"+
"User: "+this.algorithm.getFullname()+"\n"+
"Algorithm name: "+this.algorithm.getName()+"\n"+
"Staging DataMiner Host: "+ a.getHost(this.env)+"\n"+
"Staging DataMiner Host: "+ a.getStagingHost()+"\n"+
"Caller VRE: "+ScopeProvider.instance.get()+"\n"+
"Target VRE: "+rProtoVREName+"\n";
***REMOVED***

View File

@ -84,8 +84,7 @@ public class CheckMethod {
public boolean algoExists(Algorithm a, String env) throws Exception{
System.out.println("checking existing in env: "+ env);
public boolean algoExists(Algorithm a/*, String env*/) throws Exception{
File file = new File("/home/gcube/wps_algorithms/algorithms/"+a.getName()+".jar");
File file2 = new File("/home/gcube/wps_algorithms/algorithms/"+a.getName()+"_interface.jar");
@ -95,9 +94,9 @@ public class CheckMethod {
System.out.println("Second file is located to: "+file2.getPath());
if ((this.doesExist(file.getPath(),env)) && (this.doesExist(file2.getPath(),env))){
this.copyFromDmToSVN(file,env);
this.copyFromDmToSVN(file2,env);
if ((this.doesExist(file.getPath()/*,env*/)) && (this.doesExist(file2.getPath()/*,env*/))){
this.copyFromDmToSVN(file/*,env*/);
this.copyFromDmToSVN(file2/*,env*/);
return true;
@ -108,13 +107,13 @@ public class CheckMethod {
***REMOVED***
public void deleteFiles(Algorithm a,String env) throws Exception{
public void deleteFiles(Algorithm a/*,String env*/) throws Exception{
JSch jsch = new JSch();
Session session = null;
Channel channel = null;
ChannelSftp c = null;
ServiceConfiguration p = new ServiceConfiguration();
System.out.println("checking existing in env: "+ env + " " + p.getHost(env));
System.out.println("checking existing in env: " + p.getStagingHost());
File file = new File("/home/gcube/wps_algorithms/algorithms/"+a.getName()+".jar");
File file2 = new File("/home/gcube/wps_algorithms/algorithms/"+a.getName()+"_interface.jar");
@ -130,7 +129,7 @@ public class CheckMethod {
jsch.addIdentity(privateKey);
System.out.println("Private Key Added.");
session = jsch.getSession("root", p.getHost(env));
session = jsch.getSession("root", p.getStagingHost());
System.out.println("session created.");
java.util.Properties config = new java.util.Properties();
@ -145,7 +144,7 @@ public class CheckMethod {
c = (ChannelSftp) channel;
if(doesExist(file.getPath(),env)&&(doesExist(file2.getPath(),env))){
if(doesExist(file.getPath()/*,env*/)&&(doesExist(file2.getPath()/*,env*/))){
c.rm(file.getPath());
c.rm(file2.getPath());
@ -163,7 +162,7 @@ public class CheckMethod {
public boolean doesExist(String path, String env) throws Exception {
public boolean doesExist(String path/*, String env*/) throws Exception {
JSch jsch = new JSch();
Session session = null;
Channel channel = null;
@ -178,7 +177,7 @@ public class CheckMethod {
jsch.addIdentity(privateKey);
System.out.println("Private Key Added.");
session = jsch.getSession("root", p.getHost(env));
session = jsch.getSession("root", p.getStagingHost());
System.out.println("session created.");
java.util.Properties config = new java.util.Properties();
@ -217,7 +216,7 @@ public class CheckMethod {
public void copyFromDmToSVN(File a,String env) throws Exception {
public void copyFromDmToSVN(File a/*,String env*/) throws Exception {
JSch jsch = new JSch();
Session session = null;
ServiceConfiguration sc = new ServiceConfiguration();
@ -231,7 +230,7 @@ public class CheckMethod {
jsch.addIdentity(privateKey);
System.out.println("Private Key Added.");
session = jsch.getSession("root", p.getHost(env));
session = jsch.getSession("root", p.getStagingHost());
System.out.println("session created.");
java.util.Properties config = new java.util.Properties();
@ -304,7 +303,7 @@ public class CheckMethod {
Algorithm al = new Algorithm();
al.setName("RBLACKBOX");
a.deleteFiles(al, "Dev");
a.deleteFiles(al);

View File

@ -13,20 +13,22 @@ public class ClusterBuilder {
***REMOVED***1. to complete
public static Cluster getStagingDataminerCluster(String env) throws FileNotFoundException{
public static Cluster getStagingDataminerCluster() throws FileNotFoundException{
Cluster cluster = new Cluster();
ServiceConfiguration p = new ServiceConfiguration();
Host h = new Host();
h.setName(p.getStagingHost());
cluster.addHost(h);
if (env.equals("Dev")){
h.setName(p.getDevStagingHost());
cluster.addHost(h);
***REMOVED***
if ((env.equals("Prod")||(env.equals("Proto")))){
h.setName(p.getProtoProdStagingHost());
cluster.addHost(h);
***REMOVED***
***REMOVED*** if (env.equals("Dev")){
***REMOVED*** h.setName(p.getDevStagingHost());
***REMOVED*** cluster.addHost(h);
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** if ((env.equals("Prod")||(env.equals("Proto")))){
***REMOVED*** h.setName(p.getProtoProdStagingHost());
***REMOVED*** cluster.addHost(h);
***REMOVED*** ***REMOVED***
return cluster;
***REMOVED***

View File

@ -50,98 +50,159 @@ public class SVNUpdater {
public String getDependencyFile(String language, String env){
public String getDependencyFile(String language/*, String env*/){
String a = "";
if (env.equals("Dev")){
a= this.getDevDependencyFile(language);
***REMOVED***
if (env.equals("Prod")){
a= this.getProdDependencyFile(language);
***REMOVED***
if (env.equals("Proto")){
a= this.getRProtoDependencyFile(language);
***REMOVED***
***REMOVED*** if (env.equals("Dev")){
***REMOVED*** a= this.getDevDependencyFile(language);
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** if (env.equals("Prod")){
***REMOVED*** a= this.getProdDependencyFile(language);
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** if (env.equals("Proto")){
***REMOVED*** a= this.getRProtoDependencyFile(language);
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** if (env.equals("Preprod")){
***REMOVED*** a= this.getPreProdDependencyFile(language);
***REMOVED*** ***REMOVED***
a = this.getStagingDependencyFile(language);
return a;
***REMOVED***
public String getRProtoDependencyFile(String language) {
switch (language) {
case "R":
return this.configuration.getSVNRProtoCRANDepsList();
case "R-blackbox":
return this.configuration.getSVNRProtoRBDepsList();
case "Java":
return this.configuration.getSVNRProtoJavaDepsList();
case "Knime-Workflow":
return this.configuration.getSVNRProtoKWDepsList();
case "Linux-compiled":
return this.configuration.getSVNRProtoLinuxCompiledDepsList();
case "Octave":
return this.configuration.getSVNRProtoOctaveDepsList();
case "Python":
return this.configuration.getSVNRProtoPythonDepsList();
case "Pre-Installed":
return this.configuration.getSVNRProtoPreInstalledDepsList();
case "Windows-compiled":
return this.configuration.getSVNRProtoWCDepsList();
default:
return null;
***REMOVED***
***REMOVED***
***REMOVED*** public String getRProtoDependencyFile(String language) {
***REMOVED*** switch (language) {
***REMOVED*** case "R":
***REMOVED*** return this.configuration.getSVNRProtoCRANDepsList();
***REMOVED*** case "R-blackbox":
***REMOVED*** return this.configuration.getSVNRProtoRBDepsList();
***REMOVED*** case "Java":
***REMOVED*** return this.configuration.getSVNRProtoJavaDepsList();
***REMOVED*** case "Knime-Workflow":
***REMOVED*** return this.configuration.getSVNRProtoKWDepsList();
***REMOVED*** case "Linux-compiled":
***REMOVED*** return this.configuration.getSVNRProtoLinuxCompiledDepsList();
***REMOVED*** case "Octave":
***REMOVED*** return this.configuration.getSVNRProtoOctaveDepsList();
***REMOVED*** case "Python":
***REMOVED*** return this.configuration.getSVNRProtoPythonDepsList();
***REMOVED*** case "Pre-Installed":
***REMOVED*** return this.configuration.getSVNRProtoPreInstalledDepsList();
***REMOVED*** case "Windows-compiled":
***REMOVED*** return this.configuration.getSVNRProtoWCDepsList();
***REMOVED*** default:
***REMOVED*** return null;
***REMOVED*** ***REMOVED***
***REMOVED******REMOVED***
public String getProdDependencyFile(String language) {
switch (language) {
case "R":
return this.configuration.getSVNRProdCRANDepsList();
case "R-blackbox":
return this.configuration.getSVNRProdRBDepsList();
case "Java":
return this.configuration.getSVNRProdJavaDepsList();
case "Knime-Workflow":
return this.configuration.getSVNRProdKWDepsList();
case "Linux-compiled":
return this.configuration.getSVNRProdLinuxCompiledDepsList();
case "Octave":
return this.configuration.getSVNRProdOctaveDepsList();
case "Python":
return this.configuration.getSVNRProdPythonDepsList();
case "Pre-Installed":
return this.configuration.getSVNRProdPreInstalledDepsList();
case "Windows-compiled":
return this.configuration.getSVNRProdWCDepsList();
default:
return null;
***REMOVED***
***REMOVED***
***REMOVED*** public String getPreProdDependencyFile(String language) {
***REMOVED*** switch (language) {
***REMOVED*** case "R":
***REMOVED*** return this.configuration.getSVNPreProdCRANDepsList();
***REMOVED*** case "R-blackbox":
***REMOVED*** return this.configuration.getSVNPreProdRBDepsList();
***REMOVED*** case "Java":
***REMOVED*** return this.configuration.getSVNPreProdJavaDepsList();
***REMOVED*** case "Knime-Workflow":
***REMOVED*** return this.configuration.getSVNPreProdKWDepsList();
***REMOVED*** case "Linux-compiled":
***REMOVED*** return this.configuration.getSVNPreProdLinuxCompiledDepsList();
***REMOVED*** case "Octave":
***REMOVED*** return this.configuration.getSVNPreProdOctaveDepsList();
***REMOVED*** case "Python":
***REMOVED*** return this.configuration.getSVNPreProdPythonDepsList();
***REMOVED*** case "Pre-Installed":
***REMOVED*** return this.configuration.getSVNPreProdPreInstalledDepsList();
***REMOVED*** case "Windows-compiled":
***REMOVED*** return this.configuration.getSVNPreProdWCDepsList();
***REMOVED*** default:
***REMOVED*** return null;
***REMOVED*** ***REMOVED***
***REMOVED******REMOVED***
***REMOVED*** public String getProdDependencyFile(String language) {
***REMOVED*** switch (language) {
***REMOVED*** case "R":
***REMOVED*** return this.configuration.getSVNProdCRANDepsList();
***REMOVED*** case "R-blackbox":
***REMOVED*** return this.configuration.getSVNProdRBDepsList();
***REMOVED*** case "Java":
***REMOVED*** return this.configuration.getSVNProdJavaDepsList();
***REMOVED*** case "Knime-Workflow":
***REMOVED*** return this.configuration.getSVNProdKWDepsList();
***REMOVED*** case "Linux-compiled":
***REMOVED*** return this.configuration.getSVNProdLinuxCompiledDepsList();
***REMOVED*** case "Octave":
***REMOVED*** return this.configuration.getSVNProdOctaveDepsList();
***REMOVED*** case "Python":
***REMOVED*** return this.configuration.getSVNProdPythonDepsList();
***REMOVED*** case "Pre-Installed":
***REMOVED*** return this.configuration.getSVNProdPreInstalledDepsList();
***REMOVED*** case "Windows-compiled":
***REMOVED*** return this.configuration.getSVNProdWCDepsList();
***REMOVED*** default:
***REMOVED*** return null;
***REMOVED*** ***REMOVED***
***REMOVED******REMOVED***
public String getDevDependencyFile(String language) {
***REMOVED*** public String getDevDependencyFile(String language) {
***REMOVED*** switch (language) {
***REMOVED*** case "R":
***REMOVED*** return this.configuration.getSVNDevCRANDepsList();
***REMOVED*** case "R-blackbox":
***REMOVED*** return this.configuration.getSVNDevRBDepsList();
***REMOVED*** case "Java":
***REMOVED*** return this.configuration.getSVNDevJavaDepsList();
***REMOVED*** case "Knime-Workflow":
***REMOVED*** return this.configuration.getSVNDevKWDepsList();
***REMOVED*** case "Linux-compiled":
***REMOVED*** return this.configuration.getSVNDevLinuxCompiledDepsList();
***REMOVED*** case "Octave":
***REMOVED*** return this.configuration.getSVNDevOctaveDepsList();
***REMOVED*** case "Python":
***REMOVED*** return this.configuration.getSVNDevPythonDepsList();
***REMOVED*** case "Pre-Installed":
***REMOVED*** return this.configuration.getSVNDevPreInstalledDepsList();
***REMOVED*** case "Windows-compiled":
***REMOVED*** return this.configuration.getSVNDevWCDepsList();
***REMOVED*** default:
***REMOVED*** return null;
***REMOVED*** ***REMOVED***
***REMOVED******REMOVED***
***REMOVED***
public String getStagingDependencyFile(String language) {
switch (language) {
case "R":
return this.configuration.getSVNRDevCRANDepsList();
return this.configuration.getSVNStagingCRANDepsList();
case "R-blackbox":
return this.configuration.getSVNRDevRBDepsList();
return this.configuration.getSVNStagingRBDepsList();
case "Java":
return this.configuration.getSVNRDevJavaDepsList();
return this.configuration.getSVNStagingJavaDepsList();
case "Knime-Workflow":
return this.configuration.getSVNRDevKWDepsList();
return this.configuration.getSVNStagingKWDepsList();
case "Linux-compiled":
return this.configuration.getSVNRDevLinuxCompiledDepsList();
return this.configuration.getSVNStagingLinuxCompiledDepsList();
case "Octave":
return this.configuration.getSVNRDevOctaveDepsList();
return this.configuration.getSVNStagingOctaveDepsList();
case "Python":
return this.configuration.getSVNRDevPythonDepsList();
return this.configuration.getSVNStagingPythonDepsList();
case "Pre-Installed":
return this.configuration.getSVNRDevPreInstalledDepsList();
return this.configuration.getSVNStagingPreInstalledDepsList();
case "Windows-compiled":
return this.configuration.getSVNRDevWCDepsList();
return this.configuration.getSVNStagingWCDepsList();
default:
return null;
***REMOVED***
@ -151,98 +212,129 @@ public class SVNUpdater {
public void readRPRotoDeps(Algorithm algorithm) throws SVNException {
if (algorithm.getLanguage().equals("R")) {
this.checkIfAvaialable(this.configuration.getSVNRProtoCRANDepsList(), algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("R-blackbox")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Java")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Knime-Workflow")) {
this.checkIfAvaialable(this.configuration.getSVNRProtoCRANDepsList(), algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Linux-compiled")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Octave")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Python")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Windows-compiled")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Pre-Installed")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
***REMOVED*** public void readPreProdDeps(Algorithm algorithm) throws SVNException {
***REMOVED*** if (algorithm.getLanguage().equals("R")) {
***REMOVED*** this.checkIfAvaialable(this.configuration.getSVNRProtoCRANDepsList(), algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("R-blackbox")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Java")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Knime-Workflow")) {
***REMOVED*** this.checkIfAvaialable(this.configuration.getSVNRProtoCRANDepsList(), algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Linux-compiled")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Octave")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Python")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Windows-compiled")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Pre-Installed")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED******REMOVED***
***REMOVED***
***REMOVED***
public void readProdDeps(Algorithm algorithm) throws SVNException {
if (algorithm.getLanguage().equals("R")) {
this.checkIfAvaialable(this.configuration.getSVNRProdCRANDepsList(), algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("R-blackbox")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Java")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Knime-Workflow")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Linux-compiled")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Octave")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Python")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Windows-compiled")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Pre-Installed")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
***REMOVED***
public void readRDevDeps(Algorithm algorithm) throws SVNException {
if (algorithm.getLanguage().equals("R")) {
this.checkIfAvaialable(this.configuration.getSVNRProtoCRANDepsList(), algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("R-blackbox")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Java")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Knime-Workflow")) {
this.checkIfAvaialable(this.configuration.getSVNRProtoCRANDepsList(), algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Linux-compiled")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Octave")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Python")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Windows-compiled")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Pre-Installed")) {
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
***REMOVED*** public void readRPRotoDeps(Algorithm algorithm) throws SVNException {
***REMOVED*** if (algorithm.getLanguage().equals("R")) {
***REMOVED*** this.checkIfAvaialable(this.configuration.getSVNRProtoCRANDepsList(), algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("R-blackbox")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Java")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Knime-Workflow")) {
***REMOVED*** this.checkIfAvaialable(this.configuration.getSVNRProtoCRANDepsList(), algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Linux-compiled")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Octave")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Python")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Windows-compiled")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Pre-Installed")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public void readProdDeps(Algorithm algorithm) throws SVNException {
***REMOVED*** if (algorithm.getLanguage().equals("R")) {
***REMOVED*** this.checkIfAvaialable(this.configuration.getSVNProdCRANDepsList(), algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("R-blackbox")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Java")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Knime-Workflow")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Linux-compiled")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Octave")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Python")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Windows-compiled")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Pre-Installed")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED******REMOVED***
***REMOVED***
***REMOVED***
***REMOVED***
***REMOVED*** public void readRDevDeps(Algorithm algorithm) throws SVNException {
***REMOVED*** if (algorithm.getLanguage().equals("R")) {
***REMOVED*** this.checkIfAvaialable(this.configuration.getSVNRProtoCRANDepsList(), algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("R-blackbox")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Java")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Knime-Workflow")) {
***REMOVED*** this.checkIfAvaialable(this.configuration.getSVNRProtoCRANDepsList(), algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Linux-compiled")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Octave")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Python")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Windows-compiled")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED*** if (algorithm.getLanguage().equals("Pre-Installed")) {
***REMOVED*** this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED*** ***REMOVED***
***REMOVED******REMOVED***
@ -255,23 +347,31 @@ public class SVNUpdater {
***REMOVED*** this.updateSVN(this.configuration.getSVNRProdGitHubDepsList(), algorithm.getGitHubDependencies());
***REMOVED******REMOVED***
public void updateSVNAlgorithmList(Algorithm algorithm, String targetVRE, String category, String algorithm_type, String user, String env) {
if (env.equals("Dev")){
this.updateSVNAlgorithmList(this.configuration.getSVNDevAlgorithmsList(), algorithm, targetVRE, category,algorithm_type, user, env);
***REMOVED***
if (env.equals("Prod")){
this.updateSVNAlgorithmList(this.configuration.getSVNProdAlgorithmsList(), algorithm, targetVRE, category, algorithm_type, user, env);
***REMOVED***
if (env.equals("Proto")){
this.updateSVNAlgorithmList(this.configuration.getSVNRProtoAlgorithmsList(), algorithm, targetVRE, category, algorithm_type, user, env);
***REMOVED***
***REMOVED***
***REMOVED*** public void updateSVNAlgorithmList(Algorithm algorithm, String targetVRE, String category, String algorithm_type, String user/*, String env*/) {
***REMOVED***
***REMOVED*** if (env.equals("Dev")){
***REMOVED*** this.updateSVNAlgorithmList(this.configuration.getSVNDevAlgorithmsList(), algorithm, targetVRE, category,algorithm_type, user, env);
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** if (env.equals("Prod")){
***REMOVED*** this.updateSVNAlgorithmList(this.configuration.getSVNProdAlgorithmsList(), algorithm, targetVRE, category, algorithm_type, user, env);
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** if (env.equals("Proto")){
***REMOVED*** this.updateSVNAlgorithmList(this.configuration.getSVNRProtoAlgorithmsList(), algorithm, targetVRE, category, algorithm_type, user, env);
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** if (env.equals("Preprod")){
***REMOVED*** this.updateSVNAlgorithmList(this.configuration.getSVNPreProdAlgorithmsList(), algorithm, targetVRE, category, algorithm_type, user, env);
***REMOVED*** ***REMOVED***
***REMOVED******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, env);
public void updateSVNStagingAlgorithmList(Algorithm algorithm, String targetVRE, String category, String algorithm_type, String user/*, String env*/) {
this.updateSVNAlgorithmList(this.configuration.getSVNStagingAlgorithmsList(), algorithm, targetVRE, category, algorithm_type, user);
***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);
***REMOVED***
@ -377,7 +477,7 @@ public class SVNUpdater {
***REMOVED***
public void updateSVNAlgorithmList(String file, Algorithm algorithm, String targetVRE, String category, String algorithm_type, String user, String env) {
public void updateSVNAlgorithmList(String file, Algorithm algorithm, String targetVRE, String category, String algorithm_type, String user/*, String env*/) {
try {
System.out.println("Updating algorithm list: " + file);
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
@ -397,7 +497,7 @@ public class SVNUpdater {
***REMOVED***
***REMOVED*** the algorithm is not in the list or must be overwritten cause some modification. Add it
newContent.add(this.generateAlgorithmEntry(algorithm, targetVRE, category,algorithm_type, env));
newContent.add(this.generateAlgorithmEntry(algorithm, targetVRE, category,algorithm_type/*, env*/));
***REMOVED*** Collections.sort(newContent);
final SVNDeltaGenerator deltaGenerator = new SVNDeltaGenerator();
@ -432,7 +532,7 @@ public class SVNUpdater {
***REMOVED***
***REMOVED***
public String generateAlgorithmEntry(Algorithm algorithm, String targetVRE, String category, String algorithm_type,String env) throws ParseException {
public String generateAlgorithmEntry(Algorithm algorithm, String targetVRE, String category, String algorithm_type/*,String env*/) throws ParseException {
***REMOVED***Timestamp timestamp = new Timestamp(System.currentTimeMillis());
***REMOVED***long unixTime = System.currentTimeMillis() / 1000L;
@ -440,7 +540,7 @@ public class SVNUpdater {
sb.append(algorithm.getName() + " | ");
sb.append(algorithm.getFullname() + " | ");
sb.append(category + " | ");
sb.append(env + " | ");
***REMOVED***sb.append(env + " | ");
sb.append("<notextile>./addAlgorithm.sh " + algorithm.getName() + " " + algorithm.getCategory() + " "
+ algorithm.getClazz() + " " + targetVRE + " " + algorithm_type + " N "
+ algorithm.getPackageURL() + " \"" + algorithm.getDescription() + "\" </notextile> | ");
@ -454,6 +554,15 @@ public class SVNUpdater {
***REMOVED*** SendMail sm = new SendMail();
***REMOVED*** NotificationHelper nh = new NotificationHelper();
List<String> undefined = new LinkedList<String>();
***REMOVED***to fix in next release: if the file is not present for that language in the service.properties then skip and return null list of string
***REMOVED***just to uncomment the following lines
***REMOVED***if(file.isEmpty()){
***REMOVED***return undefined;
***REMOVED******REMOVED***
System.out.println("Checking dependencies list: " + file);
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
@ -464,10 +573,6 @@ public class SVNUpdater {
validDependencies.add(l.trim());
***REMOVED***
List<String> undefined = new LinkedList<String>();
for(Dependency d: deps){
String depName = d.getName();
if(!validDependencies.contains(depName)){

View File

@ -48,45 +48,45 @@ public class ServiceConfiguration {
***REMOVED***RProto
public String getSVNRProtoAlgorithmsList(){
return props.getProperty("svn.rproto.algorithms-list");
***REMOVED*** public String getSVNRProtoAlgorithmsList(){
***REMOVED*** return props.getProperty("svn.rproto.algorithms-list");
***REMOVED******REMOVED***
***REMOVED***
public String getSVNRProtoLinuxCompiledDepsList(){
return props.getProperty("svn.rproto.deps-linux-compiled");
***REMOVED*** public String getSVNRProtoLinuxCompiledDepsList(){
***REMOVED*** return props.getProperty("svn.rproto.deps-linux-compiled");
***REMOVED******REMOVED***
***REMOVED***
public String getSVNRProtoCRANDepsList(){
return props.getProperty("svn.rproto.deps-r");
***REMOVED***
public String getSVNRProtoPreInstalledDepsList(){
return props.getProperty("svn.rproto.deps-pre-installed");
***REMOVED***
public String getSVNRProtoRBDepsList(){
return props.getProperty("svn.rproto.deps-r-blackbox");
***REMOVED***
public String getSVNRProtoJavaDepsList(){
return props.getProperty("svn.rproto.deps-java");
***REMOVED***
public String getSVNRProtoKWDepsList(){
return props.getProperty("svn.rproto.deps-knime-workflow");
***REMOVED***
public String getSVNRProtoOctaveDepsList(){
return props.getProperty("svn.rproto.deps-octave");
***REMOVED***
public String getSVNRProtoPythonDepsList(){
return props.getProperty("svn.rproto.deps-python");
***REMOVED***
public String getSVNRProtoWCDepsList(){
return props.getProperty("svn.rproto.deps-windows-compiled");
***REMOVED*** public String getSVNRProtoCRANDepsList(){
***REMOVED*** return props.getProperty("svn.rproto.deps-r");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public String getSVNRProtoPreInstalledDepsList(){
***REMOVED*** return props.getProperty("svn.rproto.deps-pre-installed");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public String getSVNRProtoRBDepsList(){
***REMOVED*** return props.getProperty("svn.rproto.deps-r-blackbox");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public String getSVNRProtoJavaDepsList(){
***REMOVED*** return props.getProperty("svn.rproto.deps-java");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public String getSVNRProtoKWDepsList(){
***REMOVED*** return props.getProperty("svn.rproto.deps-knime-workflow");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public String getSVNRProtoOctaveDepsList(){
***REMOVED*** return props.getProperty("svn.rproto.deps-octave");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public String getSVNRProtoPythonDepsList(){
***REMOVED*** return props.getProperty("svn.rproto.deps-python");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public String getSVNRProtoWCDepsList(){
***REMOVED*** return props.getProperty("svn.rproto.deps-windows-compiled");
***REMOVED******REMOVED***
***REMOVED***Prod
@ -94,131 +94,223 @@ public class ServiceConfiguration {
return props.getProperty("svn.prod.algorithms-list");
***REMOVED***
public String getSVNRProdLinuxCompiledDepsList(){
return props.getProperty("svn.prod.deps-linux-compiled");
***REMOVED*** public String getSVNProdLinuxCompiledDepsList(){
***REMOVED*** return props.getProperty("svn.prod.deps-linux-compiled");
***REMOVED******REMOVED***
***REMOVED***
public String getSVNRProdCRANDepsList(){
return props.getProperty("svn.prod.deps-r");
***REMOVED***
public String getSVNRProdPreInstalledDepsList(){
return props.getProperty("svn.prod.deps-pre-installed");
***REMOVED*** public String getSVNProdCRANDepsList(){
***REMOVED*** return props.getProperty("svn.prod.deps-r");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public String getSVNProdPreInstalledDepsList(){
***REMOVED*** return props.getProperty("svn.prod.deps-pre-installed");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public String getSVNProdRBDepsList(){
***REMOVED*** return props.getProperty("svn.prod.deps-r-blackbox");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public String getSVNProdJavaDepsList(){
***REMOVED*** return props.getProperty("svn.prod.deps-java");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public String getSVNProdKWDepsList(){
***REMOVED*** return props.getProperty("svn.prod.deps-knime-workflow");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public String getSVNProdOctaveDepsList(){
***REMOVED*** return props.getProperty("svn.prod.deps-octave");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public String getSVNProdPythonDepsList(){
***REMOVED*** return props.getProperty("svn.prod.deps-python");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED*** public String getSVNProdWCDepsList(){
***REMOVED*** return props.getProperty("svn.prod.deps-windows-compiled");
***REMOVED******REMOVED***
***REMOVED***
public String getSVNRProdRBDepsList(){
return props.getProperty("svn.prod.deps-r-blackbox");
***REMOVED***
public String getSVNRProdJavaDepsList(){
return props.getProperty("svn.prod.deps-java");
***REMOVED***PreProd
***REMOVED*** public String getSVNPreProdAlgorithmsList(){
***REMOVED*** return props.getProperty("svn.preprod.algorithms-list");
***REMOVED*** ***REMOVED***
***REMOVED***
public String getSVNRProdKWDepsList(){
return props.getProperty("svn.prod.deps-knime-workflow");
***REMOVED*** public String getSVNPreProdLinuxCompiledDepsList(){
***REMOVED*** return props.getProperty("svn.preprod.deps-linux-compiled");
***REMOVED*** ***REMOVED***
***REMOVED***
public String getSVNRProdOctaveDepsList(){
return props.getProperty("svn.prod.deps-octave");
***REMOVED*** public String getSVNPreProdCRANDepsList(){
***REMOVED*** return props.getProperty("svn.preprod.deps-r");
***REMOVED*** ***REMOVED***
***REMOVED***
public String getSVNRProdPythonDepsList(){
return props.getProperty("svn.prod.deps-python");
***REMOVED***
public String getSVNRProdWCDepsList(){
return props.getProperty("svn.prod.deps-windows-compiled");
***REMOVED***
***REMOVED*** public String getSVNPreProdPreInstalledDepsList(){
***REMOVED*** return props.getProperty("svn.preprod.deps-pre-installed");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNPreProdRBDepsList(){
***REMOVED*** return props.getProperty("svn.preprod.deps-r-blackbox");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNPreProdJavaDepsList(){
***REMOVED*** return props.getProperty("svn.preprod.deps-java");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNPreProdKWDepsList(){
***REMOVED*** return props.getProperty("svn.preprod.deps-knime-workflow");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNPreProdOctaveDepsList(){
***REMOVED*** return props.getProperty("svn.preprod.deps-octave");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNPreProdPythonDepsList(){
***REMOVED*** return props.getProperty("svn.preprod.deps-python");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNPreProdWCDepsList(){
***REMOVED*** return props.getProperty("svn.preprod.deps-windows-compiled");
***REMOVED*** ***REMOVED***
***REMOVED***dev
public String getSVNDevAlgorithmsList(){
return props.getProperty("svn.dev.algorithms-list");
***REMOVED***
public String getSVNRDevLinuxCompiledDepsList(){
return props.getProperty("svn.dev.deps-linux-compiled");
***REMOVED***
public String getSVNRDevCRANDepsList(){
return props.getProperty("svn.dev.deps-r");
***REMOVED***
public String getSVNRDevPreInstalledDepsList(){
return props.getProperty("svn.dev.deps-pre-installed");
***REMOVED***
public String getSVNRDevRBDepsList(){
return props.getProperty("svn.dev.deps-r-blackbox");
***REMOVED***
public String getSVNRDevJavaDepsList(){
return props.getProperty("svn.dev.deps-java");
***REMOVED***
public String getSVNRDevKWDepsList(){
return props.getProperty("svn.dev.deps-knime-workflow");
***REMOVED***
public String getSVNRDevOctaveDepsList(){
return props.getProperty("svn.dev.deps-octave");
***REMOVED***
public String getSVNRDevPythonDepsList(){
return props.getProperty("svn.dev.deps-python");
***REMOVED***
public String getSVNRDevWCDepsList(){
return props.getProperty("svn.dev.deps-windows-compiled");
***REMOVED***
public String getCSVUrl() {
return props.getProperty("HAPROXY_CSV");
***REMOVED*** public String getSVNDevAlgorithmsList(){
***REMOVED*** return props.getProperty("svn.dev.algorithms-list");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNDevLinuxCompiledDepsList(){
***REMOVED*** return props.getProperty("svn.dev.deps-linux-compiled");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNDevCRANDepsList(){
***REMOVED*** return props.getProperty("svn.dev.deps-r");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNDevPreInstalledDepsList(){
***REMOVED*** return props.getProperty("svn.dev.deps-pre-installed");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNDevRBDepsList(){
***REMOVED*** return props.getProperty("svn.dev.deps-r-blackbox");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNDevJavaDepsList(){
***REMOVED*** return props.getProperty("svn.dev.deps-java");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNDevKWDepsList(){
***REMOVED*** return props.getProperty("svn.dev.deps-knime-workflow");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNDevOctaveDepsList(){
***REMOVED*** return props.getProperty("svn.dev.deps-octave");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNDevPythonDepsList(){
***REMOVED*** return props.getProperty("svn.dev.deps-python");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** public String getSVNDevWCDepsList(){
***REMOVED*** return props.getProperty("svn.dev.deps-windows-compiled");
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED***
***REMOVED*** public String getCSVUrl() {
***REMOVED*** return props.getProperty("HAPROXY_CSV");
***REMOVED******REMOVED***
public String getHost(String env){
String a = "";
if (env.equals("Dev")){
a = this.getDevStagingHost().trim();
***REMOVED***
if (env.equals("Prod")||(env.equals("Prod"))){
a = this.getProtoProdStagingHost().trim();
***REMOVED***
return a;
***REMOVED*** public String getHost(String env){
***REMOVED*** String a = "";
***REMOVED***
***REMOVED*** if (env.equals("Dev")||(env.equals("Preprod"))){
***REMOVED*** a = this.getDevStagingHost().trim();
***REMOVED*** ***REMOVED***
***REMOVED***
***REMOVED*** if (env.equals("Prod")||(env.equals("Proto"))){
***REMOVED*** a = this.getProtoProdStagingHost().trim();
***REMOVED*** ***REMOVED***
***REMOVED*** return a;
***REMOVED******REMOVED***
***REMOVED*** public String getDevStagingHost() {
***REMOVED*** return props.getProperty("DEV_STAGING_HOST");
***REMOVED******REMOVED***
public String getStagingHost() {
return props.getProperty("STAGE_GHOST");
***REMOVED***
public String getDevStagingHost() {
return props.getProperty("DEV_STAGING_HOST");
***REMOVED***
***REMOVED*** public String getProtoProdStagingHost() {
***REMOVED*** return props.getProperty("PROTO_PROD_STAGING_HOST");
***REMOVED******REMOVED***
***REMOVED***Staging
public String getSVNStagingAlgorithmsList(){
return props.getProperty("svn.stage.algorithms-list");
***REMOVED***
public String getSVNStagingLinuxCompiledDepsList(){
return props.getProperty("svn.stage.deps-linux-compiled");
***REMOVED***
public String getSVNStagingCRANDepsList(){
return props.getProperty("svn.stage.deps-r");
***REMOVED***
public String getSVNStagingPreInstalledDepsList(){
return props.getProperty("svn.stage.deps-pre-installed");
***REMOVED***
public String getSVNStagingRBDepsList(){
return props.getProperty("svn.stage.deps-r-blackbox");
***REMOVED***
public String getSVNStagingJavaDepsList(){
return props.getProperty("svn.stage.deps-java");
***REMOVED***
public String getSVNStagingKWDepsList(){
return props.getProperty("svn.stage.deps-knime-workflow");
***REMOVED***
public String getSVNStagingOctaveDepsList(){
return props.getProperty("svn.stage.deps-octave");
***REMOVED***
public String getSVNStagingPythonDepsList(){
return props.getProperty("svn.stage.deps-python");
***REMOVED***
public String getSVNStagingWCDepsList(){
return props.getProperty("svn.stage.deps-windows-compiled");
***REMOVED***
public String getProtoProdStagingHost() {
return props.getProperty("PROTO_PROD_STAGING_HOST");
***REMOVED***
public static void main(String[] args) throws FileNotFoundException {
ServiceConfiguration a = new ServiceConfiguration();
***REMOVED***System.out.println(a.getStagingHost());
System.out.println(a.getDevStagingHost());
System.out.println(a.getProtoProdStagingHost());
System.out.println(a.getCSVUrl());
System.out.println(a.getSVNMainAlgoRepo());
System.out.println(a.getSVNRProtoCRANDepsList());
***REMOVED***System.out.println(a.getDevStagingHost());
***REMOVED***System.out.println(a.getProtoProdStagingHost());
***REMOVED***System.out.println(a.getCSVUrl());
***REMOVED***System.out.println(a.getSVNMainAlgoRepo());
***REMOVED***System.out.println(a.getSVNRProtoCRANDepsList());
System.out.println(a.getStagingHost());
***REMOVED***

View File

@ -1,50 +1,23 @@
#YML node file
DEV_STAGING_HOST: dataminer1-devnext.d4science.org
PROTO_PROD_STAGING_HOST: dataminer-proto-ghost.d4science.org
SVN_REPO: https:***REMOVED***svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/RConfiguration/RPackagesManagement/
#HAPROXY_CSV: http:***REMOVED***data.d4science.org/Yk4zSFF6V3JOSytNd3JkRDlnRFpDUUR5TnRJZEw2QjRHbWJQNStIS0N6Yz0
SVN_REPO = https:***REMOVED***svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/RConfiguration/RPackagesManagement/
svn.repository = https:***REMOVED***svn.d4science.research-infrastructures.eu/gcube
svn.algo.main.repo = /trunk/data-analysis/DataMinerConfiguration/algorithms
svn.rproto.algorithms-list = /trunk/data-analysis/DataMinerConfiguration/algorithms/proto/algorithms
svn.rproto.deps-linux-compiled =
svn.rproto.deps-pre-installed =
svn.rproto.deps-r-blackbox =
svn.rproto.deps-r = /trunk/data-analysis/RConfiguration/RPackagesManagement/test_r_cran_pkgs.txt
svn.rproto.deps-java =
svn.rproto.deps-knime-workflow =
svn.rproto.deps-octave =
svn.rproto.deps-python =
svn.rproto.deps-windows-compiled =
#STAGE
STAGE_GHOST = dataminer-ghost-d.dev.d4science.org
svn.stage.algorithms-list = /trunk/data-analysis/DataMinerConfiguration/algorithms/dev/algorithms
svn.stage.deps-linux-compiled = /trunk/data-analysis/RConfiguration/RPackagesManagement/r_deb_pkgs.txt
svn.stage.deps-pre-installed = /trunk/data-analysis/RConfiguration/RPackagesManagement/r_deb_pkgs.txt
svn.stage.deps-r-blackbox = /trunk/data-analysis/RConfiguration/RPackagesManagement/r_cran_pkgs.txt
svn.stage.deps-r = /trunk/data-analysis/RConfiguration/RPackagesManagement/r_cran_pkgs.txt
svn.stage.deps-java =
svn.stage.deps-knime-workflow =
svn.stage.deps-octave =
svn.stage.deps-python =
svn.stage.deps-windows-compiled =
svn.prod.algorithms-list = /trunk/data-analysis/DataMinerConfiguration/algorithms/prod/algorithms
svn.prod.deps-linux-compiled =
svn.prod.deps-pre-installed =
svn.prod.deps-r-blackbox =
svn.prod.deps-r = /trunk/data-analysis/RConfiguration/RPackagesManagement/r_cran_pkgs.txt
svn.prod.deps-java =
svn.prod.deps-knime-workflow =
svn.prod.deps-octave =
svn.prod.deps-python =
svn.prod.deps-windows-compiled =
svn.dev.algorithms-list = /trunk/data-analysis/DataMinerConfiguration/algorithms/dev/algorithms
svn.dev.deps-linux-compiled =
svn.dev.deps-pre-installed =
svn.dev.deps-r-blackbox =
svn.dev.deps-r = /trunk/data-analysis/RConfiguration/RPackagesManagement/r_cran_pkgs.txt
svn.dev.deps-java =
svn.dev.deps-knime-workflow =
svn.dev.deps-octave =
svn.dev.deps-python =
svn.dev.deps-windows-compiled =
#PROD
svn.prod.algorithms-list = /trunk/data-analysis/DataMinerConfiguration/algorithms/prod/algorithms

View File

@ -5,12 +5,12 @@
<web-app>
<display-name>Archetype Created Web Application</display-name>
<context-param>
<!-- <context-param>
<param-name>Environment</param-name>
<param-value>Dev</param-value>
<!-- Possible Values: Dev, Proto, Prod -->
Possible Values: Dev, Proto, Prod, Preprod
<description>This is a context parameter example</description>
</context-param>
</context-param> -->
<servlet>
<servlet-name>REST-API</servlet-name>