说明
包含前期调试遇到的问题
idea中,命令执行testng.xml,报错
Please refer to D:\myjava\apiAutoTest\target\surefire-reports for the individual test results.
参考:https://www.cnblogs.com/uncleyong/p/16705982.html
无法连接仓库: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.
参考:https://www.cnblogs.com/uncleyong/p/16701289.html
权限不足
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
标签:xml,git,java,name,settings,maven,k8s From: https://www.cnblogs.com/uncleyong/p/16717272.html