异常解决方案汇总

使用docker容器启动做Pipeline流水线节点agent时,mvn执行启动异常

从 Maven 3.8.1 版本开始,Maven 不再支持仓库使用 HTTP 协议,所以你在使用高版本 Maven 的时候,可能会报异常:

    Could not transfer artifact com.xx:xxx:pom:1.6.0 from/to maven-default-http-blocker (http://0.0.0.0/): ...

Maven Setting.xml 中添加如下mirror仓库代码:

    <mirror>
      <id>maven-default-http-blocker</id>
      <mirrorOf>!*</mirrorOf>
      <url>http://0.0.0.0/</url>
    </mirror>

jenkins环境变量与工具配置

  • 在全局工具配置GIT,其他全都不用配置
  • 在各自节点配置环境变量,以免任务启动时出现"mvn: command not found"

jenkins节点异常 “sh: command not found”

节点设置环境变量PATH 拼上 : /bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin

使用 k8s 部署 jenkins 启动 java agent代理连接异常

allure 测试报告找不到 report-result 路径

  • 在 src/test/resources/ 目录下新增 allure.properties 配置文件
  • allure.properties文件中添加配置项: allure.results.directory=target/allure-results