Add build-tag in test result

Issue-ID: VNFSDK-334

Change-Id: Iaff5c9459f47397721eea971c087e1d3e0d5a7be
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/resource/VTPResource.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/resource/VTPResource.java
index 6c8b127..685e009 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/resource/VTPResource.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/resource/VTPResource.java
@@ -39,6 +39,9 @@
 import org.open.infc.grpc.Result;
 import org.open.infc.grpc.client.OpenRemoteCli;
 
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.google.gson.internal.LinkedTreeMap;
 
 import io.swagger.annotations.Api;
@@ -106,6 +109,11 @@
             return Response.serverError().entity(result.getOutput()).build();
         }
 
-        return Response.ok(result.getOutput(), MediaType.APPLICATION_JSON).build();
+        ObjectMapper mapper = new ObjectMapper();
+        JsonNode resultJson = mapper.readTree(result.getOutput());
+
+        ((ObjectNode)resultJson).put("build_tag", System.getenv("BUILD_TAG"));
+
+        return Response.ok(resultJson.toString(), MediaType.APPLICATION_JSON).build();
     }
 }