https://github.com/gkalian/gitlab-allure-history-java
Allure report history on gitlab pages (mirror from gitlab)
https://github.com/gkalian/gitlab-allure-history-java
allure allure-report gitlab java
Last synced: about 2 months ago
JSON representation
Allure report history on gitlab pages (mirror from gitlab)
- Host: GitHub
- URL: https://github.com/gkalian/gitlab-allure-history-java
- Owner: gkalian
- Created: 2023-06-19T11:07:48.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2026-04-09T14:50:25.000Z (3 months ago)
- Last Synced: 2026-04-09T16:29:10.732Z (3 months ago)
- Topics: allure, allure-report, gitlab, java
- Language: Groovy
- Homepage: https://gkalian.gitlab.io/gitlab-allure-history-java/
- Size: 997 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Gitlab Allure History Java
```
Update 30/09/2025
Current approach seems overly complex. There's a smoother solution that doesn't require an additional branch or image.
I'd recommend checking out this article on Medium:
https://medium.com/@vladimirbabin/gitlab-pages-allure-reports-with-history-a40db5e3bdb8
```
Example project using GitLab CI/CD for Allure report with history on GitLab Pages based **on Java**. This project exists only because of [Aleksandr's Kotlyar work](https://github.com/aleksandr-kotlyar/gitlab-allure-history/tree/master).
I needed to use Java instead of Python, so I made myself some changes:
- project is Maven now;
- original generate_index file is on groovy;
- additional html and css style in order to have "Last modified" column in results.
[Demo](https://gkalian.gitlab.io/gitlab-allure-history-java/)
### How to use
- Enable **Pages** in your project
- In your main branch:
- Extend your `gitlab-ci.yml` with stage "report" from this repo
- Use image for this stage based on this Dockerfile
- Copy `generate_index.groovy` script into your main repo folder
- Create branch `gl-pages`, it will be used for storing allure history
- You can clean the whole branch from any files
- Clear current `gitlab-ci.yml`
- Create in the branch stage to publish Pages on Gitlab
Final results should be published on Gitlab Pages for each branch individually.
> Note: Due to GitLab's policies, the personal access token I am using does not trigger the job, causing an error "The pipeline failed due to the user not being verified". I suspect the issue lies with my profile. Possible solutions include using your own dedicated runners instead of shared ones or a self-hosted GitLab instance. Or something else, it's not clear for me anyway.
### How it works
1. Job `test` is running tests on your current branch and saves allure-results and JOB_ID to artifacts for the next job in pipeline.
2. Job `report`:
- Clones `gl-pages` branch with it's all content into container (saving all previous reports).
- Gets the 'history' of the last build from the same branch (if exists) into 'allure-results' of current build.
- Creates 'executor.json' in 'allure-results' with build info and buildUrls in trends.
- Generates report with allure Commandline into job_number build folder.
- Creates branch-dir in 'gl-pages' `/public` directory if it's not existed yet.
- Copies report into 'gl-pages' `/public/branch` directory: `/public/branch/job_number`.
- Generates the index files for page tree `/public` and `/public/branch`.
- Commits and pushes the public directory into 'gl-pages' branch into the repo.
3. And then push to branch 'gl-pages' triggers it's own job `pages` which publishes all content from `/public` directory on GitLab Pages.
All data can be accessed from the root link of GitLab Pages, where you can always see all the history of each branch and find the latest execution by the latest job_number inside the branch-dir of the branch you are interested in.
### Links
[Gitlab repository](https://gitlab.com/gkalian/gitlab-allure-history-java)
[Github mirror](https://github.com/gkalian/gitlab-allure-history-java)