My report path: /var/jenkins_home/workspace/first_python/unit/allure_report.tar.gz
At the beginning, I directly added the absolute path, and found that the sent email did not have an attachment
Then online search found that the default root directory is workspace
Then I changed it to: first_python/unit/allure_report.tar.gz sent, but still did not receive the attachment.
problem solved:
It turned out that my default root directory was first_python, so I changed it to: unit/allure_report.tar.gz and it succeeded.
In fact, if you don’t know the default follow path, you can print it out through the shell command: pwd in the build.
Because I already know my root directory, so I directly manipulate the root directory.
Delete the previous report before generating the report, otherwise it will report a file permission error.