jenkins下运行sonarscanner报错

1、问题描述

构建jenkins任务时,控制台输出以下报错 :"sonar-pytest测试框架任务构建-37" is not a valid project key. Allowed characters are alphanumeric, '-', '_', '.' and ':', with at least one non-digit.详细报错如下所示:

ERROR: Error during SonarScanner execution
ERROR: Validation of project failed:
  o "sonar-pytest测试框架任务构建-37" is not a valid project key. Allowed characters are alphanumeric, '-', '_', '.' and ':', with at least one non-digit.
ERROR: 
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succeed?
ERROR: SonarQube scanner exited with non-zero code: 1
[pytest测试框架任务构建] $ C:\Users\houruihong\.jenkins\tools\ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation\allure\bin\allure.bat generate C:\Users\houruihong\.jenkins\workspace\pytest测试框架任务构建\result -c -o C:\Users\houruihong\.jenkins\workspace\pytest测试框架任务构建\allure-report
Report successfully generated to C:\Users\houruihong\.jenkins\workspace\pytest测试框架任务构建\allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
Email was triggered for: Always
Sending email for trigger: Always
Sending email to: 511278779@qq.com
Finished: FAILURE

 2、解决办法:

在jenkins的任务列表,修改存在问题的任务名称,进行重命名,修改为英文名称后,重新构建成功。 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值