Publish Allure reports with preserved history to GitLab Pages using GitLab CI and static files. No report server, database, web framework, or external storage service is required.
This project publishes Allure report history to GitLab Pages using static files only. It is designed for GitLab CI/CD projects, GitLab Pages hosting, immutable per-pipeline report snapshots, stable branch-level latest/ aliases, and lightweight merge request report links.
It is not a test management system, ReportPortal replacement, backend service, database-backed analytics platform, generic multi-CI report publisher, or object-storage report warehouse.
Include the component in .gitlab-ci.yml and pin a published release tag:
include:
- component: gitlab.com/aleksandr-kotlyar/gitlab-allure-history/gitlab-allure-history@2026.2.11
inputs:
reports-to-keep: "30"
stages:
- test
- report
test:
stage: test
script:
- pip install -r requirements.txt
- pytest --alluredir=allure-results
artifacts:
when: always
paths:
- allure-resultsThe component adds a publish-allure-history job that generates the HTML report, preserves history across runs, pushes the generated content to the storage branch, and publishes GitLab Pages from the main/component pipeline.
Provider-neutral report generation is supplied by
core-allure-history.
This repository contains the GitLab CI adapter, storage-branch publishing, and
merge request integration.
Warning
This component publishes the project's GitLab Pages site from public/. If the project already uses GitLab Pages for another site, use a dedicated project for Allure history or avoid conflicting Pages deployments.
- GitLab Pages enabled for the project.
- A
GIT_PUSH_TOKENCI variable withwrite_repositorypermission. - Test jobs that publish an
allure-results/artifact.
The component creates the gl-pages persistent storage branch automatically on the first run if it does not exist. The branch stores generated public/ content and history; it is not a deployment pipeline branch and does not need its own .gitlab-ci.yml.
Create a project, group, or personal access token with write_repository permission and store it as GIT_PUSH_TOKEN. The token must be allowed to create and push to gl-pages, including when branch protection is enabled. Mark it protected only if reports are published exclusively from protected branches.
Test jobs must save allure-results/ with artifacts.when: always. They may also publish a jobid file containing the test job ID; otherwise, the report job uses its own CI_JOB_ID for the snapshot folder.
| Area | Status | Notes |
|---|---|---|
| GitLab CI/CD | Supported | Primary target. |
| GitLab CI/CD components | Supported | Recommended integration model. |
| GitLab Pages | Supported | Reports are published as static Pages content. |
| Allure Report 2 | Supported | Current target format. |
| Allure Report 3 | Not verified | Planned research item. |
| pytest | Tested by demo | Used as the reference example. |
| Other Allure-compatible frameworks | Expected | Should work if they produce standard allure-results. |
| Self-managed GitLab | Expected | Not fully covered by consumer contract fixtures yet. |
| GitHub Actions | Out of scope | This project is GitLab-native. |
- Test jobs publish
allure-results/. - The component prepares the persistent
gl-pagesstorage tree. core-allure-historyrestores history and generates a new immutable report.- Core updates retention, static indexes, and the stable
latest/alias. - The
public/tree is committed togl-pageswith CI skipped for persistent storage. - The same
public/tree is uploaded by thepublish-allure-historyjob and published by GitLab Pages from the main/component pipeline.
Reports are persisted in the gl-pages storage branch. The branch contains generated content, not a separate Pages deployment pipeline:
public/
index.html
{environment}/
index.html
{branch-slug}/
index.html
latest/
index.html
history/
job_NNN/
latest/redirects to the newest immutablejob_NNN/snapshot.history/is reused by the next run to preserve Allure trends.- Root, environment, and branch indexes provide navigation.
- Branch folders use
CI_COMMIT_REF_SLUGto keep paths URL-safe.
Use the stable latest-report URL:
https://<pages-domain>/<project>/<environment>/<branch-slug>/latest/
Use an immutable snapshot URL when linking to a specific pipeline result:
https://<pages-domain>/<project>/<environment>/<branch-slug>/job_NNN/
latest/ is a static HTML redirect, not a report copy or symlink.
Pin the GitLab component itself to a published release tag:
include:
- component: gitlab.com/aleksandr-kotlyar/gitlab-allure-history/gitlab-allure-history@2026.2.11
inputs:
environment: devThe component uses a tested Core Allure History runtime image internally. In normal usage, there is nothing extra to pin or override beyond the component version shown above.
The version scheme is YYYY.MINOR.PATCH. See CHANGELOG.md for release history.
| Input | Default | Description |
|---|---|---|
environment |
dev |
Report environment folder under public/. |
pages-branch |
gl-pages |
Persistent storage branch for generated Pages content and Allure history. |
reports-to-keep |
30 |
Report snapshots retained per environment and branch. |
comment-mr |
false |
Post or update a merge request comment with the current immutable report URL. |
ALLURE_HISTORY_INDEX_DESKTOP_BATCH_SIZE: rows shown beforeShow more...on desktop. Default25; set to0for no limit.ALLURE_HISTORY_INDEX_MOBILE_BATCH_SIZE: rows shown beforeShow more...on mobile. Default12; set to0for no limit.ALLURE_HISTORY_TOKEN: token withapiscope for merge request comments. Without it, comments are skipped.
ENV: report environment folder, populated from theenvironmentinput.CI_COMMIT_REF_SLUG: branch report folder.CI_JOB_ID: fallback report snapshot ID when nojobidartifact exists.CI_PAGES_URL: report URL metadata.CI_PIPELINE_URL: pipeline URL metadata.
The runner needs network access to pull the runtime image, clone and push the Pages branch, and upload the public/ artifact.
- GitLab project: gitlab.com/aleksandr-kotlyar/gitlab-allure-history
- Published reports: aleksandr-kotlyar.gitlab.io/gitlab-allure-history
Check that GIT_PUSH_TOKEN is allowed to create and push the configured storage branch. If branch protection requires pre-creation by a maintainer, create the branch once and rerun the pipeline.
Check that GIT_PUSH_TOKEN is available to the pipeline, has write_repository permission, and is allowed to push to gl-pages. Protected variables are unavailable on unprotected branches.
The first run for a branch has no previous history. The report still publishes, and later runs reuse the generated history/ folder.
This is expected. Report paths use CI_COMMIT_REF_SLUG.
- Document compatibility with non-pytest Allure producers.
- Investigate Allure Report 3 compatibility.
Some requests may be useful for specific teams while remaining outside the core open-source roadmap. Examples include backend services, database-backed analytics, custom dashboards, object storage integrations, non-GitLab CI/CD integrations, custom enterprise workflows, and advanced flaky-test analytics.
These are not planned for the core open-source roadmap, but may be considered as sponsored development, custom integrations, or separately maintained extensions.
Development setup, repository CI details, testing, scope, and release procedures are documented in CONTRIBUTING.md.
MIT