You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I'm working with bitbucket pipeline. My pipeline succeeds and it generates a test coverage report.
Coverage report generated for RSpec to /opt/atlassian/pipelines/agent/build/coverage. 4358 / 5426 LOC (80.32%) covered.
Stopped processing SimpleCov as a previous error not related to SimpleCov has been detected
How can I find this report to see the detailed information?
Thanks in advance.
Hi @Tony and welcome to the community!
The path that you mentioned is the clone directory. Pipelines builds run in Docker containers. For every step of your pipeline, a Docker container starts, the repo is cloned in that container in the path /opt/atlassian/pipelines/agent/build/, and then the commands of the step's script are executed in that directory. When the commands finish successfully, or if a certain command fails, then the Docker container gets destroyed. The clone directory is exposed in the variable BITBUCKET_CLONE_DIR.
If you want to see a file generated during the build:
1) You can use the following pipe in the step that generates this file, in order to upload it to the Downloads page of the repository:
You can then download the file from the Downloads page.
Please keep in mind though that if a subsequent build generates and uploads a file with the same name, the existing file will get overwritten. You can work around this by giving give a unique name to the file in each build e.g. by including the build number in the file name (exposed in the variable BITBUCKET_BUILD_NUMBER) or you could upload the file to an external storage solution.
2) You can use a cat command in your yml file in order to view the content of the file in the Pipelines build log.
3) We have a test reporting feature in Pipelines that shows test results in a separate tab in the Pipelines build log, if they include a fail. Please note that this only works currently with JUnit and Maven Surefire XML formats, regardless of the language they are written in, and the xml files need to be generated in specific directories. You can find more details here:
If you have any questions, please feel free to let me know.