Hi,
I am running a Spring Boot App inside a docker container. From container I am running Integration Test and using Jacoco maven plugin to publish coverage. I have below arguments for Jacoco in my entrypoint.sh file -
-javaagent:./target/jacoco-agent/org.jacoco.agent-runtime.jar=destfile=jacoco.exec,append=true,output=tcpserver,port=9100,address=*
Below is my docker-compose.yml file -
services:
employee-service:
build:
context: .
dockerfile: Dockerfile-IT
container_name: es
ports:
- "9900:9900"
- "9100:9100"
- "8800:8800"
expose:
- "9100"
volumes:
- ./target/jacoco-agent/org.jacoco.agent-runtime.jar:/jacoco-agent.jar
I am able to run successfully on my local machine but when I am trying to build from Jenkins I am getting
[INFO] Connecting to localhost/127.0.0.1:9100
[INFO] Connection refused (Connection refused)
[INFO] Connecting to localhost/127.0.0.1:9100
[INFO] Connection refused (Connection refused)
[INFO] Connecting to localhost/127.0.0.1:9100
Not sure what settings I am missing here. Can some one please help me on this.
Jacoco Version : 0.8.2
Java Version : Java 8