Skip to content

Commit 04c1921

Browse files
authored
Update Jenkinsfile (#100)
1 parent 4e57fc1 commit 04c1921

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

Jenkinsfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
#!/usr/bin/env groovy
2-
buildPlugin(platforms: ['linux'], findbugs: [archive: true, unstableTotalAll: '0'], checkstyle: [run: true, archive: true])
3-
4-
//node {
5-
// stage 'post-build'
6-
// step([$class: 'MasterCoverageAction'])
7-
//}
1+
buildPlugin(useContainerAgent: true, configurations: [
2+
[ platform: 'linux', jdk: '8' ],
3+
[ platform: 'linux', jdk: '11' ],
4+
[ platform: 'windows', jdk: '11' ],
5+
])

src/test/java/com/github/terma/jenkins/githubprcoveragestatus/JacocoParserTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void throwExceptionWhenExtractCoverageFromJacocoAndNoLineTag() {
6363
new JacocoParser("LINE").get(filePath);
6464
Assert.fail("Where is my exception?");
6565
} catch (Exception e) {
66-
String messageWithoutAbsolutePath = e.getMessage().replace(filePath, "FILE_PATH");
66+
String messageWithoutAbsolutePath = e.getMessage().replace(filePath, "FILE_PATH").replace("\r", "").trim();
6767
Assert.assertEquals(
6868
"Strange Jacoco report!\n" +
6969
"File path: FILE_PATH\n" +
@@ -86,7 +86,7 @@ public void throwExceptionWhenExtractCoverageFromJacocoAndMissedNotNumber() {
8686
new JacocoParser("LINE").get(filePath);
8787
Assert.fail("Where is my exception?");
8888
} catch (Exception e) {
89-
String messageWithoutAbsolutePath = e.getMessage().replace(filePath, "FILE_PATH");
89+
String messageWithoutAbsolutePath = e.getMessage().replace(filePath, "FILE_PATH").replace("\r", "").trim();
9090
Assert.assertEquals(
9191
"Strange Jacoco report!\n" +
9292
"File path: FILE_PATH\n" +
@@ -110,7 +110,7 @@ public void throwExceptionWhenExtractCoverageFromJacocoAndCoveredNotNumber() {
110110
new JacocoParser("LINE").get(filePath);
111111
Assert.fail("Where is my exception?");
112112
} catch (Exception e) {
113-
String messageWithoutAbsolutePath = e.getMessage().replace(filePath, "FILE_PATH");
113+
String messageWithoutAbsolutePath = e.getMessage().replace(filePath, "FILE_PATH").replace("\r", "").trim();
114114
Assert.assertEquals(
115115
"Strange Jacoco report!\n" +
116116
"File path: FILE_PATH\n" +

0 commit comments

Comments
 (0)