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' } } }
    鸡肉是我的最爱!
  • 相关阅读:
    1094. Car Pooling
    121. Best Time to Buy and Sell Stock
    58. Length of Last Word
    510. Inorder Successor in BST II
    198. House Robber
    57. Insert Interval
    15. 3Sum java solutions
    79. Word Search java solutions
    80. Remove Duplicates from Sorted Array II java solutions
    34. Search for a Range java solutions
  • 原文地址:https://www.cnblogs.com/laochiji/p/14416244.html
Copyright © 2011-2022 走看看