Getting JUnit report out of CI images
mikko.ropanen
Spryker Solution Partner Posts: 31 ✨ - Novice
Hi, by default the CI image deploy.ymls use docker:mount:baked, so the generated test reports are not exposed to the CI host.
Is there some clever way to get the test reports out as an artifact?
Note: this is mostly for Gitlab using the Docker-in-Docker setup described here https://docs.spryker.com/docs/ca/dev/configure-deployment-pipelines/configure-gitlab-pipelines.html
Tagged:
0
Answers
-
So what I ended up doing in .gitlab-ci.yml:
artifacts: when: always reports: junit: $JUNITREPORT … after_script: - docker cp $(docker ps -aqf "name=^.*cli_1$"):/data/$JUNITREPORT $JUNITREPORT
The tricky part was finding out the container id, but eventually I found out you can do this to get the id of a running Docker container whose name ends in "cli_1":
docker ps -aqf "name=^.*cli_1$"
1
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K 📜 Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random