企业级持续集成实战系列(15):持续集成踩坑汇总
本系列汇总,请查看这里:https://www.cnblogs.com/uncleyong/p/16721826.html
说明
包含前期调试遇到的问题
问题一:idea中,命令执行testng.xml,报错
Please refer to D:\myjava\apiAutoTest\target\surefire-reports for the individual test results.
忽略test的错误,断言失败也继续构建,加参数:-Dmaven.test.failure.ignore=true
问题二:无法连接仓库:Host key verification failed.
无法连接仓库:Command "git ls-remote -h git@192.168.117.180:qzcsbj/gift.git HEAD" returned status code 128: stdout: stderr: No ECDSA host key is known for 192.168.117.180 and you have requested strict checking. Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
找到不能ssh登录的IP, 然后将IP对应的public key 删除:vim ~/.ssh/known_hosts
问题三:权限不足
cd /usr/local/apache-maven-3.6.1
chmod 777 -R myRep/
问题四:k8s中下载jar包失败
改为阿里云镜像源
从容器拷贝配置文件到虚拟机
docker cp 9b7d8de426fc:/usr/share/maven/conf/settings.xml ./
添加阿里云镜像地址:vim settings.xml
<mirror> <id>aliyun</id> <mirrorOf>*</mirrorOf> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> </mirror>
创建cm:kubectl create configmap maven-k8s --from-file=settings.xml
Jenkinsfile中volumes下添加如下内容:
volumes: - name: "dockersock" hostPath: path: "/var/run/docker.sock" - name: "localtime" hostPath: path: "/usr/share/zoneinfo/Asia/Shanghai" - name: maven-k8s configMap: name: maven-k8s items: - key: settings.xml path: settings.xml
问题五:java.nio.file.AccessDeniedException: /home/jenkins/agent/workspace/gift/target/allure-results/testrun.json
https://www.cnblogs.com/uncleyong/p/16718719.html
问题六:hudson.plugins.git.GitException: Failed to delete workspace
https://www.cnblogs.com/uncleyong/p/17838934.html
__EOF__
本文作者:持之以恒(韧)
关于博主:擅长性能、全链路、自动化、企业级自动化持续集成(DevTestOps)、测开等
面试必备:项目实战(性能、自动化)、简历笔试,https://www.cnblogs.com/uncleyong/p/15777706.html
测试提升:从测试小白到高级测试修炼之路,https://www.cnblogs.com/uncleyong/p/10530261.html
欢迎分享:如果您觉得文章对您有帮助,欢迎转载、分享,也可以点击文章右下角【推荐】一下!
关于博主:擅长性能、全链路、自动化、企业级自动化持续集成(DevTestOps)、测开等
面试必备:项目实战(性能、自动化)、简历笔试,https://www.cnblogs.com/uncleyong/p/15777706.html
测试提升:从测试小白到高级测试修炼之路,https://www.cnblogs.com/uncleyong/p/10530261.html
欢迎分享:如果您觉得文章对您有帮助,欢迎转载、分享,也可以点击文章右下角【推荐】一下!