allure-docker-service: [SOLVED] allure-reports does not accumulate the files (under /1, /2, /3)
When I run the pytest example as-is from GitHub, everything works as expected.
When I copy the docker-container yaml file, the json files are created a bit differently.
In the example: allure-docker-python-pytest-example/allure-reports/1 allure-docker-python-pytest-example/allure-reports/2 allure-docker-python-pytest-example/allure-reports/… allure-docker-python-pytest-example/allure-reports/latest
But in my project: MyProjectRepo/allure-reports/<some_hashed_file_name>.json MyProjectRepo/allure-reports/<some_hashed_file_name>.json MyProjectRepo/allure-reports/<some_hashed_file_name>.json …
So when I run the container, it can’t find the report and the view is empty.
Why does it happen and how can I fix it?
Thanks
services:
allure:
image: "frankescobar/allure-docker-service"
environment:
CHECK_RESULTS_EVERY_SECONDS: 1
KEEP_HISTORY: 1
ports:
- "5050:5050"
volumes:
- ${PWD}/results/allure-results:/app/allure-results
- ${PWD}/results/allure-reports:/app/default-reports
allure-ui:
image: "frankescobar/allure-docker-service-ui"
environment:
ALLURE_DOCKER_PUBLIC_API_URL: "http://localhost:5050"
ALLURE_DOCKER_PUBLIC_API_URL_PREFIX: ""
ports:
- "5252:5252"
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 20 (7 by maintainers)
Found it! @fescobar
So I was working on creating a patch to apply on top of the official example so it would be easy to reproduce without making a whole new package etc. As I was doing so, I couldn’t “break” the example for some reason and everything worked.
Then I noticed this little difference between my patch and my original project: GOOD:
pytest tests/*.py --alluredir=./results/allure-results
vs BAD:pytest tests/*.py --alluredir=results/allure-results
As you can see, I tried the BAD version (without ./results) and this made the whole mess. I also tried to verify it on the example project and make the most minimal changes to reproduce this case and it was indeed reproduced in the example. So, when I fixed it in my own project, everything worked as expected.
Thank you very much and I hope this thread would be useful for others who run into this issue.
P.S Maybe you can add a note about it to the README file @fescobar 😉
In any case - great project! very useful and thank you!