{"id":19880062,"url":"https://github.com/kochetkov-ma/allure-server","last_synced_at":"2025-04-06T07:13:29.576Z","repository":{"id":44668746,"uuid":"256527492","full_name":"kochetkov-ma/allure-server","owner":"kochetkov-ma","description":"Allure Server. Save/ generate / provide allure2 reports in one place","archived":false,"fork":false,"pushed_at":"2024-08-15T10:06:19.000Z","size":13629,"stargazers_count":225,"open_issues_count":13,"forks_count":66,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-30T05:08:30.920Z","etag":null,"topics":["allure-report","allure-server","allure2","docker","spring-boot","vaadin"],"latest_commit_sha":null,"homepage":"http://allure.iopump.ru","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kochetkov-ma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-17T14:36:04.000Z","updated_at":"2025-03-27T09:18:25.000Z","dependencies_parsed_at":"2024-01-12T17:46:21.028Z","dependency_job_id":"383378b2-8a6d-41c9-80c8-216d1f5b0a07","html_url":"https://github.com/kochetkov-ma/allure-server","commit_stats":{"total_commits":84,"total_committers":11,"mean_commits":7.636363636363637,"dds":"0.48809523809523814","last_synced_commit":"d725aab34611b0c707a71e27a5d6ecbb4876a3ba"},"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kochetkov-ma%2Fallure-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kochetkov-ma%2Fallure-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kochetkov-ma%2Fallure-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kochetkov-ma%2Fallure-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kochetkov-ma","download_url":"https://codeload.github.com/kochetkov-ma/allure-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445671,"owners_count":20939958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["allure-report","allure-server","allure2","docker","spring-boot","vaadin"],"created_at":"2024-11-12T17:10:08.110Z","updated_at":"2025-04-06T07:13:29.556Z","avatar_url":"https://github.com/kochetkov-ma.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Allure Portal (Allure Report Server)\n=================================\n![Build / Test / Check](https://github.com/kochetkov-ma/allure-server/workflows/Build%20/%20Test%20/%20Check/badge.svg?branch=master)\n\n![Static Badge](https://img.shields.io/badge/java-21-brightgreen)\n![Static Badge](https://img.shields.io/badge/gradle-8.8-brightgreen)\n![Static Badge](https://img.shields.io/badge/Spring%20Boot-3-green)\n\n![Docker Image Version](https://img.shields.io/docker/v/kochetkovma/allure-server?label=DockerHub\u0026link=https%3A%2F%2Fhub.docker.com%2Fr%2Fkochetkovma%2Fallure-server)\n![Docker Pulls](https://img.shields.io/docker/pulls/kochetkovma/allure-server?link=https%3A%2F%2Fhub.docker.com%2Fr%2Fkochetkovma%2Fallure-server)\n\n## About\n\nhttps://allurereport.org/docs\n\nAllure server for store / aggregate / manage Allure results and generate / manage Allure Reports.\n\nThere is simple API with Swagger(OpenAPI) Description.\n\nJust use Spring Boot Jar from Release Page.\n\nWeb GUI has been available from Release v2.0.0\n\nExample on [allure.iopump.ru](http://allure.iopump.ru/)\n\n## Get Started\n\n### Docker\n\nThere is a docker image on Docker Hub: [allure-server](https://hub.docker.com/r/kochetkovma/allure-server)\nRunning as Docker container look at: [readme](https://hub.docker.com/r/kochetkovma/allure-server)\n\n### Kubernetes\n\nUse Helm Chart for Kubernetes from **[.helm/allure-server/README.md](.helm/allure-server/README.md)**\n\n### Jar\n\nGet the latest release [Releases](https://github.com/kochetkov-ma/allure-server/releases)   \nDownload `allure-server.jar`  \nUpdate your jre(jdk) up to [Java 11](https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html)  \nExecute command `java -jar allure-server.jar`\n\nGot to `http://localhost:8080` - will redirect to OpenAPI (Swagger UI)\n\n### Upload results or use [GitHub Actions](#github-actions)\n\nOnly allure2 supported  \nMake some allure results and create `zip` archive with these results, for example `allure-results.zip` in your root dir\n\n```shell\ncurl -X POST 'http://localhost:8080/api/result' \\\n-H  \"accept: */*\" \\\n-H  \"Content-Type: multipart/form-data\" \\\n-F \"allureResults=@allure-results.zip;type=application/x-zip-compressed\"\n```\n\nResponse:\n\n```\n{\n    \"fileName\": \"allure-results.zip\",\n    \"uuid\": \"1037f8be-68fb-4756-98b6-779637aa4670\"\n}\n```\n\nSave `uuid`  \nDon't forget specify form item Content type as `application/zip`. Server works with `zip` archives only!\n\n### Generate report\n\nFor generate new report execute `POST` request with `json` body:\n\n```shell\ncurl --location --request POST 'http://localhost:8080/api/report' \\\n--header 'Content-Type: application/json' \\\n--data-raw '{\n  \"reportSpec\": {\n    \"path\": [\n      \"master\",\n      \"666\"\n    ],\n    \"executorInfo\": {\n      \"buildName\": \"#666\"\n    }\n  },\n  \"results\": [\n    \"1037f8be-68fb-4756-98b6-779637aa4670\"\n  ],\n  \"deleteResults\": false\n}'\n```\n\nResponse:\n\n```\n{\n    \"uuid\": \"c994654d-6d6a-433c-b8e3-90c77d0e8163\"\n    \"path\": \"master/666\",\n    \"url\": \"http://localhost:8080/allure/reports/c994654d-6d6a-433c-b8e3-90c77d0e8163/\",\n    \"latest\": \"http://localhost:8080/reports/master/666\",\n}\n```\n\nMemorize `url`\n\n\u003e :warning: **Generated Reports, and their History are grouping by `path` key. This key means something like `project` or `job` or `branch`. The latest report with the same `path` will be active**: It is not a real path - it's a logical path. The same situation with `path` column in GUI!\n\n### Access to generated reports\n\nAfter generating you can access the latest report by `http://localhost:8080/allure/reports/master/666/index.html`\n\nYou may get all reports\n\n```shell\ncurl --location --request GET 'http://localhost:8080/api/report'\n```\n\nOr by path as branch name `master`\n\n```shell\ncurl --location --request GET 'http://localhost:8080/api/report?path=master'\n```\n\nYou may get all uploaded results:\n\n```shell\ncurl --location --request GET 'http://localhost:8080/api/result'\n```\n\nYou can clear all results or reports:\n\n```shell\ncurl --location --request DELETE 'http://localhost:8080/api/result'\ncurl --location --request DELETE 'http://localhost:8080/api/report'\n```\n\nOr clear reports older than date (in epoch seconds):\n\n```shell\ncurl --location --request DELETE 'http://localhost:8080/api/report?seconds=1604693740'\n```\n\n### Cleanup features (since 1.10.0)\n\nOnce per day the scheduler started and remove old reports with age better then `allure.clean.ageDays`.\n\nBesides, if specified `allure.clean.paths` items with fields `path` and `ageDays`\nall reports with path = `allure.clean.paths[].path` will be removed based on separate max age\nfrom `allure.clean.paths[].ageDays`\n\n**_Example:_**\n\n```yaml\nallure:\n  clean:\n    dryRun: false\n    time: \"00:00\"\n    ageDays: 90\n    paths:\n      - path: \"manual_uploaded\"\n        ageDays: 30\n      - path: \"service/production-job\"\n        ageDays: 10\n```\n\n- Report with path=`test` and age=`100d` will be removed at today MIDNIGHT\n- Report with path=`test` and age=`99d` will **NOT** be removed at today MIDNIGHT\n- Report with path=`manual_uploaded` and age=`30d` will be removed at today MIDNIGHT\n- Report with path=`manual_uploaded` and age=`29d` will **NOT** be removed at today MIDNIGHT\n- Report with path=`service/production-job` and age=`10d` will be removed at today MIDNIGHT\n- Report with path=`service/production-job` and age=`9d` will **NOT** be removed at today MIDNIGHT\n\n### OAuth2 feature (since 2.12.0)\nSeparate Spring profile has been added `oauth`\n\nTo enable `Oauth` add this profile to `SPRING_PROFILES_ACTIVE` . For example:\n- in `values.yaml` (Helm): \n```yaml\nenv:\n    SPRING_PROFILES_ACTIVE: oauth\n``` \n- shell command `export SPRING_PROFILES_ACTIVE=oauth`\n- docker compose\n```yaml\n    environment:\n      SPRING_PROFILES_ACTIVE: oauth\n```\n\nNow [application-oauth.yaml](src/main/resources/application-oauth.yaml) is adjusted to use Google Auth Server:\n```yaml\n### Internal Spring Configuration\nspring:\n  security:\n    oauth2:\n      client:\n        registration:\n          google:\n            client-id: ${OAUTH2_GOOGLE_ALLURE_CLIENT_ID}\n            client-secret: ${OAUTH2_GOOGLE_ALLURE_CLIENT_SECRET}\n            scope: openid, profile, email\n            redirect-uri: \"{baseUrl}/login/oauth2/code/{registrationId}\"\n            client-name: Google\n        provider:\n          google:\n            issuer-uri: https://accounts.google.com\n\n### App OAuth2 Security Configuration Toggle\napp:\n  security:\n    enable-oauth2: true\n```\nPass your `OAUTH2_GOOGLE_ALLURE_CLIENT_ID` and `OAUTH2_GOOGLE_ALLURE_CLIENT_SECRET` or override configuration options to use other provider.\n\nThere is Oauth feature-toggle `app.security.enable-oauth2`\n\n\u003e Every spring boot setting can be passed through ENV variables with a little changes according to [spring boot cfg docs](https://docs.spring.io/spring-boot/docs/1.5.5.RELEASE/reference/html/boot-features-external-config.html)\n\n**By default `oauth` profile is not used and disabled**\n\n### Youtrack Integration (since 2.13.6) `new ⚡`\n\nEnable in `application.yaml`\n```yaml\ntms:\n  enabled: true # switched to true | Default: false\n  host: youtrack.com # set youtrack HOST - NOT URL - Just hostname | Default: \"\" \n  api-base-url: https://${tms.host}/api # optional - set youtrack API URL or use default | | Default: https://${tms.host}/api\n  token: \"my-token\" # set youtrack token generated in Profile | Default: \"\"\n  issue-key-pattern: \"[A-Za-z]+-\\\\d+\" # optional - set issue key pattern | Default: \"[A-Za-z]+-\\\\d+\"\n  dry-run: false # optional - dry run mode. Set true for testing and watch AllureServer Logs | Default: false\n```\n\nOR in `docker-compose.yaml`\n```yaml\n    environment:\n      TMS_ENABLED: 'true'\n      TMS_HOST: youtrack.com\n      TMS_TOKEN: '\u003ctoken-here\u003e'\n      TMS_DRYRUN: 'false'\n```\n\n- Add Link to TMS issue to yor scenario\n```java\n@Issue(\"KEY-666\")\nvoid test() {}\n```\n\nor\n```java\n@Link(value = \"KEY-777\", url = \"https://youtrack.com/KEY-777\")\nvoid test() {}\n```\n- Generate Report\n- Open Report in Browser\n- Open scenario `test` go to link `KEY-666` and click on `KEY-666`\n- In comments you will se statistics\n\n  | **Scenario** | ❌ `Failed`                                 | ✅ `Passed`                                 |\n  |--------------|--------------------------------------------|--------------------------------------------|\n  | Scenario 1   | **2** times [`latest` on 01.01.2024](link) | **3** times [`latest` on 01.01.2024](link) |\n  | Scenario 5    | **6** times [`latest` on 01.01.2023](link) | **7** times [`latest` on 01.01.2023](link) |\n\n- this comment with statistics will be updated on every report generation\n- your TOKEN should have permission: read issue comments, read/add/update issue comments  \n\n### Custom Report Label/Logo and Title (since 2.13.6) `new ⚡`\n\nEnable in `application.yaml`\n```yaml\nallure:\n    title: \"BrewCode | Allure Report\"\n    # FROM URL: https://avatars.githubusercontent.com/u/16944358?v=4\n    # FROM FILE: file:/images/logo.png\n    logo: \"https://avatars.githubusercontent.com/u/16944358?v=4\" # or file:/images/logo.png\n```\n\nOR in `docker-compose.yaml`\n```yaml\n    environment:\n        ALLURE_LOGO: \"https://avatars.githubusercontent.com/u/16944358?v=4\"\n        ALLURE_TITLE: \"BrewCode | Allure Report\"\n```\n\u003e For using image from file you should put it into the container by volume\n\u003e \n\u003e For using image from URL your should provide access to Company Network ot Internet from container\n\n### Plugin System for Java Developers (since 2.13.6) `new ⚡` `beta`\nUse `Java 21`\n1. Create interface in your project in package `ru.iopump.qa.allure.helper.plugin`. It has to be exactly the same as in [AllureServerPlugin.java](src%2Fmain%2Fjava%2Fru%2Fiopump%2Fqa%2Fallure%2Fhelper%2Fplugin%2FAllureServerPlugin.java)\n    ```java\n    package ru.iopump.qa.allure.helper.plugin;\n    \n    import io.qameta.allure.core.LaunchResults;\n    import org.springframework.beans.factory.BeanFactory;\n    import ru.iopump.qa.allure.properties.AllureProperties;\n    import ru.iopump.qa.allure.properties.TmsProperties;\n    \n    import java.nio.file.Path;\n    import java.util.Collection;\n    \n    public interface AllureServerPlugin {\n        void onGenerationStart(Collection\u003cPath\u003e resultsDirectories, Context context);\n        void onGenerationFinish(Path reportDirectory, Collection\u003cLaunchResults\u003e launchResults, Context context);\n        String getName();\n        default boolean isEnabled(Context context) {\n            return true;\n        }\n        interface Context {\n            AllureProperties getAllureProperties();\n            TmsProperties tmsProperties();\n            BeanFactory beanFactory();\n            String getReportUrl();\n        }\n    }\n    ```\n2. Crate your plugin like:\n   - [CustomReportMetaPlugin.java](src%2Fmain%2Fjava%2Fru%2Fiopump%2Fqa%2Fallure%2Fhelper%2Fplugin%2FCustomReportMetaPlugin.java)\n   - [YouTrackPlugin.java](src%2Fmain%2Fjava%2Fru%2Fiopump%2Fqa%2Fallure%2Fhelper%2Fplugin%2FYouTrackPlugin.java)\n3. Create `FAT JAR` with all deps. Try to get rid of external deps if possible\n4. Put your jar to container by volume to `/ext` folder\n5. Run the server\n6. Check logs. There is your plugin in message after plugins discovery and loading:\n  ```\n    [ALLURE SERVER CONFIGURATION] Allure server plugins loaded: [class ru.iopump.qa.allure.helper.plugin.CustomReportMetaPlugin:Logo Plugin, class ru.iopump.qa.allure.helper.plugin.YouTrackPlugin:YouTrack integration]\n  ```\n\n### Jira Integration (since 2.14.0) `coming soon`\n\n### Plugin API in MavenCentral with proper Documentation (since 2.14.0) `coming soon`\n\n### Custom HTTP Hooks (since 2.15.0) `coming soon`\n\n### Special options\n\n\u003e Since version `1.2.0` all reports manage with Database and have unic uuids.\n\n\u003e Since version `1.10.0` there are new options for Cleanup,\n\u003e but also some old options have been renamed to integrate with the Spring Boot @ConfigurationProperties approach. And also the yaml format is used\n\nOld format is no longer supported, but you can convert reports created before 1.2.0 - just set '\nallure.support.old.format' to 'true' in Spring Configutaion:\n\n- system vars (JVM option) `-Dallure.support.old.format=true`\n- environment vars `export allure.support.old.format=true`\n- in docker environment vars `-e allure.support.old.format=true`\n\n**ENV**                      | **TYPE**                 | **DEFAULT**              | **DESCRIPTION**\n------------------------------|--------------------------|--------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------\nspring.datasource.url        | string                   | jdbc:h2:file:./allure/db | H2 jdbc connection string. By default DB file will be created/read on startup. Postgres driver supported!\nPORT                         | int                      | 8080                     | Tomcat http port\nallure.resultsDir            | string                   | allure/results/          | Unzipped results store\nallure.reports.dir           | string                   | allure/reports/          | Generated results store\nallure.reports.path          | string                   | reports/                 | Url path (after base url) to acccess to reports\nallure.reports.history-level | int                      | 20                       | Number of reports in history\nallure.support-old-format    | boolean                  | false                    | Auto-convert old format reports to new and add to db\nJAVA_OPTS                    | string                   | -Xms256m -Xmx2048m       | Java memory options for container\nallure.date-format           | string                   | yy/MM/dd HH:mm:ss        | Date Time format in grid\nallure.server-base-url       | string                   |                          | Define custom base url for results. If your server behind the proxy or other troubles to get server external hostname. Don't forget about '/' at the end\nbasic.auth.enable            | boolean                  | false                    | Enable Basic Authentication\nbasic.auth.username          | string                   | admin                    | Username for basic auth\nbasic.auth.password          | string                   | admin                    | Password for basic auth\nallure.clean.dryRun          | boolean                  | false                    | Don't delete but print logs. For testing\nallure.clean.time            | LocalTime \"HH[:mm][:ss]\" | 00:00                    | Time to check reports age/ Scheduler start once per day\nallure.clean.ageDays         | int                      | 90                       | Max age for all reports. But exclude specified paths in 'allure.clean.paths'\nallure.clean.paths[].path    | String                   | manual_uploaded          | Report path\nallure.clean.paths[].ageDays | int                      | 30                       | Max age for reports with this path\n\n\u003e Every spring boot setting can be passed through ENV variables with a little changes according to [spring boot cfg docs](https://docs.spring.io/spring-boot/docs/1.5.5.RELEASE/reference/html/boot-features-external-config.html)\n\u003e For example: `allure.report.host` transform to `ALLURE_REPORT_HOST`\n\n\u003e Postgres database supported!\n\n\u003e You can mount external jars to `/ext` folder in the container, and they will be available in app classpath.  \n\u003e For example you may add new jdbc drivers\n\n```shell\n    volumes:\n      - ./ext:/ext:rw\n```\n\n### Docker compose\n\nSee docker compose:\n\n[docker-compose with Postgres integration](./docker-compose.yml)\n\n[docker-compose with default H2 database](./docker-compose-h2.yml)\n\nUse Helm Chart for Kubernetes from **[.helm/allure-server/README.md](.helm/allure-server/README.md)**\n\n### GitHub Actions\n\nThx [Xotabu4](https://github.com/Xotabu4)\n\nThere is external GitHub Action to sent and generate Allure\nReports: [send-to-allure-server-action](https://github.com/Xotabu4/send-to-allure-server-action)\n\n```\nCompresses allure-results, sends to kochetkov-ma/allure-server , and triggers allure report generation on it. Result of this action - is URL to generated report.\n\nWorks for any test project languages (java, .net, js/ts, python, etc), for any testing frameworks (junit, pytest, cucumber, mocha, jest ...) that has allure reporter configured.\n```\n\nExample:\n\n```\n    - name: Send Results and Generate Allure Report\n      uses: Xotabu4/send-to-allure-server-action@1\n      # always() needed because we want report for failed tests as well\n      if: ${{ always() }}\n      with:\n        allure-server-url: 'http://my-allure-server.com:5001/'\n```\n\n![alt text](github-action.png)\n\n### GUI\n\n##### See example on [allure.iopump.ru](http://allure.iopump.ru/)\n\nAllure Server provide WEB UI to access to reports and results.  \nBy default WEB UI is available on path `/ui` and there is redirection from `/` to `/ui`   \nExample: `http://localhost:8080/ui`  \nWEB UI provides the same functions as a REST API  \nWEB UI is implemented with [Vaadin 14](https://vaadin.com/start/v14)\n\n\u003e :warning: **Generated Reports, and their History are grouping by `path` key. This key means something like `project` or `job` or `branch`. The latest report with the same `path` will be active**: It is not a real path - it's a logical path. The same situation with `path` column in GUI!\n\n\u003e *Main Page*\n![alt text](ui-example.png)  \n\n### Logging\n\nLogging properties are located in `[application.yaml](src%2Fmain%2Fresources%2Fapplication.yaml)`\n\n```\nlogging:\n  level:\n    root: INFO\n    org.atmosphere: WARN # Vaadin (GUI) Server\n    org.springframework: INFO\n    org.springframework.core: WARN\n    org.springframework.beans.factory.support: WARN\n    ru.iopump.qa:allure: INFO # Allure Server Logs\n```\n\nYou may override it by Environment Variables, for example enable `DEBUG` for allure server:\n```\n    export LOGGING_LEVEL_RU_IOPUMP_QA_ALLURE=DEBUG\n```\n\nOr switch all logs to `DEBUG`:\n```\n    export LOGGING_LEVEL_ROOT=DEBUG\n```\n\n## Goals\nSee [milestones](https://github.com/kochetkov-ma/allure-server/milestones)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkochetkov-ma%2Fallure-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkochetkov-ma%2Fallure-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkochetkov-ma%2Fallure-server/lists"}