Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,640,535
Community Members
 
Community Events
196
Community Groups

How do I publish my Doxygen build product

I'm setting up my first pipeline and my build creates a directory tree via Doxygen (currently in a directory 'Statstics') how do I publish this tree on BitBucket from my bitbucket-pipelines.yml file?

Ideally I'd like to see this under Statistics or Reports on the bitbucket page(s) and it calls up the index.html file in the Statistics directory (all the files are under Statistics, except a few hyperlinks i.e. <a href="https://some.url.com/mickey/mouse"> so no server side scripting is required).

my bitbucket-pipeline.yml file is:


image: atlassian/default-image:3

pipelines:
default:
- parallel:
- step:
name: Host Unit Tests
script:
- make test
#- curl -X POST "https://${BITBUCKET_USERNAME}:${BITBUCKET_APP_PASSWORD}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@"Statistics/"
#- wput Statistics/ "https://${BITBUCKET_USERNAME}:${BITBUCKET_APP_PASSWORD}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads"
- find Statistics -type f -exec curl -X POST "https://${BITBUCKET_USERNAME}:${BITBUCKET_APP_PASSWORD}@api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/commit/${BITBUCKET_COMMIT}/reports/Statistics/{}" \;
- step:
name: Build debug
script:
- make debug
- step:
name: Build release
script:
- make release

 [sorry pasting removed the indentation whitespace???]
but where are the 'reports' on bitbucket? 
I've set BITBUCKET_USERNAME} & BITBUCKET_APP_PASSWORD as per Deploy build artifacts to Bitbucket Downloads | Bitbucket Cloud | Atlassian Support and do I need to similarly specify BITBUCKET_REPO_OWNER, BITBUCKET_REPO_SLUG & BITBUCKET_COMMIT variables - if so how do I get the last one?

Sorry for newbie questions...

Aaron

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Aug 19, 2022

Hi Aaron and welcome to the community.

Are you looking for test reporting in Bitbucket Pipelines?

If so, I would advise checking the following documentation:

To enable test reporting, make sure that build test reports are generated in one of the supported default locations (with a directory depth of 4 levels):

./**/surefire-reports/**/*.xml
./**/failsafe-reports/**/*.xml
./**/test-results/**/*.xml
./**/test-reports/**/*.xml
./**/TestResults/**/*.xml

This currently works with JUnit and Maven Surefire XML formats, regardless of the language they are written in. Test reporting will be automatically enabled in your pipeline when it detects JUnit or Maven Surefire XML test results that include a fail. In this case, the test report will be shown in the Pipelines log view.

Kind regards,
Theodora

Thanks for the answer, but to clarify what syntax is this in; I don't understand '**' from a (un*x or windows) command line point of view?

OR:
Are you saying that from the top of my code (where my .git directory is) I need to create a directory tree where I have say ./Statistics/TestResults/unit_tests/junit.xml where Statistics and unit_test are arbitrary names but TestResults has to be one of the 5 names you gave above {surefire-reports, failsafe-reports, test-results, test-reports, TestResults}?

Thanks,

Aaron

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Aug 23, 2022

Hi Aaron,

Are you saying that from the top of my code (where my .git directory is) I need to create a directory tree where I have say ./Statistics/TestResults/unit_tests/junit.xml where Statistics and unit_test are arbitrary names but TestResults has to be one of the 5 names you gave above {surefire-reports, failsafe-reports, test-results, test-reports, TestResults}?

This is correct. The double asterisks ( ** ) mean any directory, the names can be arbitrary. TestResults needs to be one of the five names I mentioned.

Each step of a Pipelines build runs in a Docker container.

After the Docker container starts, the repo is cloned in /opt/atlassian/pipelines/agent/build which is the clone directory with the .git folder.

Any command you have in the script of the step in bitbucket-pipelines.yml file runs in that directory (unless you include commands to change directory).

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events