Reputation: 501
Hey so I have a Jenkins Server which runs some tests on each commit made in gerrit. I now want to commit the results of the tests made by jenkins to the repo.
Any idea how i might be able to do this?
Upvotes: 1
Views: 2349
Reputation: 22321
After the you run the tests, execute:
git add TEST-RESULTS-FILES
git commit --amend -C HEAD
And then:
git push origin HEAD:refs/for/BRANCH
These commands will add the tests results (git add), create a new patchset (git commit --amend) using the same commit message (-C HEAD) and push it to Gerrit (without submit).
You need to configure Jenkins to NOT use this patchset in a new build or you'll be stuck in a build/add/commit/push/build/add/... cycle forever.
Upvotes: 1
Reputation: 4358
Use Archive the Artifacts
plugin in post-build action.
You will also be able to download those artifacts easily from the build page.
(OR)
If you want to publish test result, you can use other plugin like Publish HTML reports
, Publish JUnit test result report
etc.
Upvotes: 0