Skip to content

Commit

Permalink
Merge branch 'master' of github.com:peterlvilim/EkstaziJenkinsPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
022aditya committed Dec 13, 2014
2 parents 0a0c42e + bc42412 commit 527f967
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ Support for enabling Ekstazi in Jenkins Maven projects
mvn test
```
Code coverage

The project uses JaCoCo as the code coverage tool to generate coverage reports. These coverage reports can then be analyzed by SonarQube. Assuming the developer has a sonar server up and running, the following sequence of commands can be used to generate and analyze code coverage for the project:
```
<add>
mvn clean test
mvn sonar:sonar
```

##To Install
Expand Down
15 changes: 5 additions & 10 deletions src/main/java/com/pluralsight/ekstazi/RunListenerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,26 +68,21 @@ private void badgeApply(AbstractBuild build, TaskListener listener, final FilePa
Callable<String, IOException> task = new Callable<String, IOException>() {
static final long serialVersionUID = 12L;
public String call() throws IOException {
String ekstaziResult = "false";
try{
MavenFinder mavenFinder = new MavenFinder(buildWorkspace);
ArrayList<FilePath> pomFiles = mavenFinder.find();
for(int i = 0; i < pomFiles.size(); i++) {
// We don't want to pick up the extraneous pom.xml files from our target/ or test/resources/ directory
if (!pomFiles.get(i).toURI().toString().contains("/target/") && !pomFiles.get(i).toURI().toString().contains("/test/resources/")) {
final FilePath remoteFile = pomFiles.get(i);
FilePath remoteFile = pomFiles.get(i);
EkstaziMavenManager ekstaziManager = new EkstaziMavenManager(remoteFile, ekstaziVersion);
boolean ekstaziEnabledInner = ekstaziManager.isEnabled();
if(ekstaziEnabledInner == true) {
return "true";
} else {
return "false";
if(ekstaziManager.isEnabled() == true) {
ekstaziResult = "true";
}
}
}
} catch (InterruptedException | EkstaziException e) {
return "false";
}
return("false");
return(ekstaziResult);
}
};
String ekstaziEnabledString = buildWorkspace.getChannel().call(task);
Expand Down

0 comments on commit 527f967

Please sign in to comment.