zoukankan      html  css  js  c++  java
  • pipline在执行的docker镜像中添加hosts

    在docker属性的args参数加上--add-host tests。abtc.com:120.1.1.65  即可



    pipeline { agent any stages { stage(
    "执行用例") { agent { docker { // label "master" image 'python3_pytest:lastest' args '--add-host tests。abtc.com:120.1.1.65 --add-host test.onp.com:8.0.6.31' } } steps { echo "**********************************git拉取master************************************" git url: 'https://e8ae5e54eb5fb@github.com/vc/test.git', branch: 'master' echo "**********************************执行用例 ****************************************" sh 'pwd;ls' sh 'pytest -n auto ./testcase/onev --html ./report/onev.html --junit-xml ./report/onev.xml' echo "**********************************执行完成 ****************************************" } post { always { // txt测试报告 junit 'report/onev.xml' // html测试报告 publishHTML (target: [ allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true, reportDir: './report', reportFiles: 'onev.html', reportName: "OneEV Report" ]) } } } } post { always { echo currentBuild.result } success { echo "success" // emailext body: '$DEFAULT_CONTENT', subject: '$DEFAULT_SUBJECT', to: '$DEFAULT_RECIPIENTS' } failure { echo "failure" emailext body: '$DEFAULT_CONTENT', subject: '$DEFAULT_SUBJECT', to: 'ci@v.com' } } }
    鸡肉是我的最爱!
  • 相关阅读:
    执行预定义命令
    利用jemalloc优化mysql
    ssh增加密匙登录
    vsftpd增加ssl安全验证
    利用脚本获取mysql的tps,qps等状态信息
    innodb_buffer_pool_size 大小建议
    linux多核cpu下的负载查看
    DDoS deflate+iptables防御轻量级ddos攻击
    CentOS通过日志反查入侵
    shell读取文件每行,并执行命令
  • 原文地址:https://www.cnblogs.com/laochiji/p/14416244.html
Copyright © 2011-2022 走看看