Skip to content

Commit

Permalink
Merge 0aa9a8a into 911e08c
Browse files Browse the repository at this point in the history
  • Loading branch information
henry-lp committed Jul 31, 2019
2 parents 911e08c + 0aa9a8a commit dfaf3c8
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
13 changes: 13 additions & 0 deletions repairnator/repairnator-scanner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@
<artifactId>repairnator-core</artifactId>
<version>3.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>javax.jms</groupId>
<artifactId>javax.jms-api</artifactId>
<version>2.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.apache.activemq/activemq-all -->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>5.7.0</version>
</dependency>
</dependencies>

<properties>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package fr.inria.spirals.repairnator.scanner;

import static fr.inria.spirals.repairnator.config.RepairnatorConfig.PIPELINE_MODE;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.Logger;
import com.martiansoftware.jsap.*;
Expand Down Expand Up @@ -144,6 +145,34 @@ private JSAP defineArgs() throws JSAPException {
opt2.setHelp("This option is only useful in case of '--bears' is used: it defines the type of fixer build to get. Available values: "+options);
jsap.registerParameter(opt2);

opt2 = new FlaggedOption("pipelinemode");
opt2.setLongFlag("pipelinemode");
opt2.setStringParser(JSAP.STRING_PARSER);
opt2.setDefault(PIPELINE_MODE.NOOP.name());
opt2.setHelp("Possible string values DOCKER,KUBERNETES,NOOP. If KUBERNETES then the scanner will listen for reposlugs and send build ids to the queue");
jsap.registerParameter(opt2);

opt2 = new FlaggedOption("activemqurl");
opt2.setLongFlag("activemqurl");
opt2.setStringParser(JSAP.STRING_PARSER);
opt2.setDefault("tcp://localhost:61616");
opt2.setHelp("format: 'tcp://IP_OR_DNSNAME:61616', default as 'tcp://localhost:61616'");
jsap.registerParameter(opt2);

opt2 = new FlaggedOption("activemqlistenqueuename");
opt2.setLongFlag("activemqlistenqueuename");
opt2.setStringParser(JSAP.STRING_PARSER);
opt2.setDefault("scanner");
opt2.setHelp("The queue name which the scanner listen for slug, default as 'scanner'");
jsap.registerParameter(opt2);

opt2 = new FlaggedOption("activemqreceivequeuename");
opt2.setLongFlag("activemqreceivequeuename");
opt2.setStringParser(JSAP.STRING_PARSER);
opt2.setDefault("pipeline");
opt2.setHelp("The queue name which the scanner send the output build ids to for repairing, default as 'pipeline'");
jsap.registerParameter(opt2);

Switch aSwitch = new Switch("bearsDelimiter");
aSwitch.setLongFlag("bearsDelimiter");
aSwitch.setHelp("This option is only useful in case of '--bears' is used and '--bearsMode both' (default) is used: it allows to" +
Expand Down Expand Up @@ -228,7 +257,6 @@ private void mainProcess() throws IOException {
Launcher.LOGGER.info("Incriminated project and pair of builds: " + buildToBeInspected.getBuggyBuild().getRepository().getSlug() + ":" + buildToBeInspected.getBuggyBuild().getId() + "" + Utils.COMMA + "" + buildToBeInspected.getPatchedBuild().getId());
}
}*/

this.processOutput(buildsToBeInspected);
} else {
Launcher.LOGGER.warn("The variable 'builds to be inspected' has null value.");
Expand All @@ -244,7 +272,7 @@ private Map<ScannedBuildStatus, List<BuildToBeInspected>> runScanner() throws IO
ProjectScanner scanner = new ProjectScanner(this.config.getLookFromDate(), this.config.getLookToDate(), this.config.getRunId());

Map<ScannedBuildStatus, List<BuildToBeInspected>> buildsToBeInspected = scanner.getListOfBuildsToBeInspectedFromProjects(this.config.getInputPath());

ProcessSerializer scannerSerializer;
if (this.config.getLauncherMode() == LauncherMode.REPAIR) {
scannerSerializer = new ScannerSerializer(this.engines, scanner);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package fr.inria.spirals.repairnator.scanner;

public class ScannerBuildListener {}

0 comments on commit dfaf3c8

Please sign in to comment.