【jenkins报“”Build step ‘Execute Windows batch command‘ marked build as failure“”问题解决】

本文介绍了在Jenkins中遇到的'Build step 'Execute Windows batch command' marked build as failure'错误。该问题源于Jenkins在Windows环境下执行批处理命令时,newman被当作外部命令处理。解决方案是在newman命令前添加'call',并在命令末尾添加'exit 0'以确保正常退出,避免jenkins标记构建失败。
摘要由CSDN通过智能技术生成

报错如下:

Building in workspace C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\销售订单双签-焦炭
[销售订单双签-焦炭] $ cmd /c call C:\WINDOWS\TEMP\jenkins16265249724103305523.bat

C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\销售订单双签-焦炭>D:

D:\>cd D:\接口自动化\销售订单双签\焦炭 

D:\接口自动化\销售订单双签\焦炭>newman run D:\接口自动化\销售订单双签\焦炭\销售订单-焦炭-双签.postman_collection.json -e D:\接口自动化\销售订单双签\脚本环境.postman_environment.json -d D:\接口自动化\销售订单双签\销售.csv -r htmlextra --reporter-htmlextra-export D:/接口自动化/销售订单双签/焦炭/测试报告/report.html 
Using htmlextra version 1.22.3
Created the htmlextra report.
Build step 'Execute Windows batch command' marked build as failure
[htmlpublisher] Archiving HTML reports...
[htmlpublisher] Archiving at PROJECT level D:/接口自动化/销售订单双签/焦炭/测试报告 to C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins\.jenkins\jobs\销售订单双签-焦炭\htmlreports\HTML_20Report
Finished: FAILURE
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值