From 3ebdbfca9355fc560711e52664acc3d3928b1332 Mon Sep 17 00:00:00 2001 From: csharp Date: Fri, 20 Mar 2015 11:42:54 +0530 Subject: [PATCH 1/4] added build badge to readme.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9e71678..88eed31 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,4 @@ Java Sample ================ Sample Java app using Maven. +[![Build Status](https://apibeta.shippable.com/projects/54732f17c2b9a03657602697/badge?branchName=master)](https://appbeta.shippable.com/projects/54732f17c2b9a03657602697/builds/latest) From f4df5ce58efe34de13f19bda9f7ad9a3ae0ec16b Mon Sep 17 00:00:00 2001 From: csharp Date: Fri, 20 Mar 2015 11:47:38 +0530 Subject: [PATCH 2/4] after_success and after_failure added to yml file --- shippable.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shippable.yml b/shippable.yml index 979d375..3c227e5 100644 --- a/shippable.yml +++ b/shippable.yml @@ -10,9 +10,12 @@ jdk: after_success: - mvn clean cobertura:cobertura - mvn test + - echo "Builds passed" before_script: mvn --version +after_failure: + - echo "builds failed" notifications: email: false From 18116030210b1cd2c065814a31c52678d6845c6d Mon Sep 17 00:00:00 2001 From: csharp Date: Fri, 20 Mar 2015 11:50:03 +0530 Subject: [PATCH 3/4] failed test case to check after_failure --- src/test/java/TestApp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/TestApp.java b/src/test/java/TestApp.java index 4688630..243be19 100644 --- a/src/test/java/TestApp.java +++ b/src/test/java/TestApp.java @@ -8,7 +8,7 @@ public void testInsertAndGetData() { App app = new App(); result = app.getData(); } finally { - assertEquals("Hope this works!", result); + assertEquals("Hope this works for build failure!", result); } } } From 3a8b8db7a58a08b936d57794258a83d56f2ea4d7 Mon Sep 17 00:00:00 2001 From: Vidya Raghavan Date: Tue, 24 Mar 2015 19:33:27 +0530 Subject: [PATCH 4/4] get a successful build --- src/test/java/TestApp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/TestApp.java b/src/test/java/TestApp.java index 243be19..b919265 100644 --- a/src/test/java/TestApp.java +++ b/src/test/java/TestApp.java @@ -8,7 +8,7 @@ public void testInsertAndGetData() { App app = new App(); result = app.getData(); } finally { - assertEquals("Hope this works for build failure!", result); + assertEquals("Hope this works !", result); } } }