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' } } }
    鸡肉是我的最爱!
  • 相关阅读:
    好想再吻一次你的唇
    我会永远永远的爱你,直到你不爱我的那一天
    我会永远永远的爱你,直到你不爱我的那一天
    回到你身边
    回到你身边
    两只公蚊子的故事
    两只公蚊子的故事
    洛谷P1090: 合并果子
    洛谷 P1288 :取数游戏II
    洛谷P1164 :小A点菜
  • 原文地址:https://www.cnblogs.com/laochiji/p/14416244.html
Copyright © 2011-2022 走看看