Py.test Python 插件未添加 --clean 以吸引报告生成

Py.test Python plugin doesn't add --clean to allure report generation

我有一个运行 shell 命令的 Jenkins 作业:

py.test -m smoke --environment=$ENVIRONMENT --alluredir="$WORKSPACE/allure-report"

但是当我将 Allure 报告构建为 post 部署步骤时,出现错误:

Allure: Target directory <directory>/allure-report for the report is 
already in use, add a '--clean' option to overwrite

如何将 --clean 选项传递给 post 部署步骤?

解决方案是自己清理并删除目录,这样就不需要 --clean 了。