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的任务列表,修改存在问题的任务名称,进行重命名,修改为英文名称后,重新构建成功。