docker环境下的代码覆盖率统计   https://www.jianshu.com/p/ab62aac30fd3

dockerFile中常用命令   https://blog.csdn.net/weixin_30292745/article/details/99828192?depth_1-utm_source=distribute.pc_relevant.none-task&utm_source=distribute.pc_relevant.none-task

 

 

源码下载位置:/root/workspace/pipeline_demo/test-v2-changedir-pipeline@2/test-v2-changedir-pipeline

源码的目录结构:README.md  pom.xml  src  target

位置的变量名称:$PRO_HOME

junittest.sh 单元测试脚本

#!/bin/bash
cd ${WORKSPACE}/${JOB_BASE_NAME}
sudo ${MAVENHOME}/bin/mvn org.jacoco:jacoco-maven-plugin:prepare-agent -f pom.xml -s ${MAVENHOME}/tmp/settings.xml -gs ${MAVENHOME}/tmp/settings.xml clean test -Dautoconfig.skip=true -Dmaven.test.skip=false -Dmaven.test.failure.ignore=true
为什么要强制替换setting文件呢
https://www.cnblogs.com/fnlingnzb-learner/p/10637802.html
mvn install 打包到私服 https://www.cnblogs.com/shamo89/p/8930543.html

docker镜像下的代码覆盖率工具

 

mvn clean test org.jacoco:jacoco-maven-plugin:prepare-agent install -f pom.xml -s ${MAVENHOME}/tmp/settings.xml  -gs ${MAVENHOME}/tmp/settings.xml clean test -Dautoconfig.skip=true -Dmaven.test.skip=false -Dmaven.test.failure.ignore=true

 

org.jacoco:jacoco-maven-plugin:prepare-agent -f pom.xml -s ${MAVENHOME}/tmp/settings.xml  -gs ${MAVENHOME}/tmp/settings.xml clean test -Dautoconfig.skip=true -Dmaven.test.skip=false -Dmaven.test.failure.ignore=true
 

docker镜像下的代码覆盖率工具

mvn -f --file <file> 强制使用备用的POM文件;
mvn -s --settings <arg> 用户配置文件的备用路径;
mvn -gs --global-settings <file> 全局配置文件的备用路径;

https://www.cnblogs.com/jinanxiaolaohu/p/11888643.html

spring boot 下执行此内容

问题:执行镜像的时候怎么触发执行此脚本呢

java -javaagent:D:\jacoco-0.8.3\lib\jacocoagent.jar=in
cludes=*,output=tcpserver,port=6300,address=127.0.0.1 -jar D:\s
pringdemo\target\demo-0.0.1-SNAPSHOT.jar

 覆盖率工具下载:https://blog.csdn.net/u012621115/article/details/53434957

https://www.cnblogs.com/keepMoveForevery/p/12205917.html