Giter Club home page Giter Club logo

Comments (8)

fescobar avatar fescobar commented on September 28, 2024

@anrock1985
Can you try with beta version, please?
Enable KEEP_HISTORY environment variable like in the example.

version: '3'
services:
  allure:
    image: "frankescobar/allure-docker-service:beta"
    environment:
      CHECK_RESULTS_EVERY_SECONDS: 1
      KEEP_HISTORY: "TRUE"
    ports:
      - "4040:4040"
      - "5050:5050"
    volumes:
      - ${PWD}/allure-results:/app/allure-results

image
image

Let me know if it's working as you expected and I will release a new version supporting that.

from allure-docker-service.

fescobar avatar fescobar commented on September 28, 2024

You can use this endpoint to clean the history
curl -X GET http://allure:5050/clean-history -ik

from allure-docker-service.

anrock1985 avatar anrock1985 commented on September 28, 2024

Thanks for fast reaction =)
Some tests from me:

`@dev26:~/IdeaProjects/ntk-crm-autotests/target$ docker run -p 80:4040 -p 5050:5050 -e CHECK_RESULTS_EVERY_SECONDS=3 -e KEEP_HISTORY="TRUE" -v ${PWD}/allure-results:/app/allure-results --name allure-docker-service frankescobar/allure-docker-service:beta
ALLURE_VERSION: 2.12.1
Generating default report
Overriding configuration
Checking Allure Results every 3 second/s
Generating report
Detecting new results...
Generating report

  • Serving Flask app "app" (lazy loading)
  • Environment: production
    WARNING: This is a development server. Do not use it in a production deployment.
    Use a production WSGI server instead.
  • Debug mode: off
  • Running on http://0.0.0.0:5050/ (Press CTRL+C to quit)
    Report successfully generated to allure-report
    Report successfully generated to allure-report
    Starting web server...
    2019-07-25 01:17:49.308:INFO::main: Logging initialized @280ms to org.eclipse.jetty.util.log.StdErrLog
    Can not open browser because this capability is not supported on your platform. You can use the link below to open the report manually.
    Server started at http://172.17.0.2:4040/. Press <Ctrl+C> to exit

Generating allure-results from tests here

Detecting new results...
mkdir: cannot create directory ‘/app/allure-results/history’: No such file or directory
Copying history from previous results...
cp: cannot create directory '/app/allure-results/history': No such file or directory
Generating report
Report successfully generated to allure-report
`
Case:
Starting container with prepared allure-results
Just after starting container we have generated report
Executing some tests to update allure-results
Allure container detects updates and starting to copy history folder
"mkdir: cannot create directory ‘/app/allure-results/history’: No such file or directory" BUG
Allure shows us a blank report

inside container
root@00c83d1757ae:/app# ls -la
total 48
drwxr-xr-x 1 root root 4096 Jul 25 01:29 .
drwxr-xr-x 1 root root 4096 Jul 25 01:17 ..
drwxr-xr-x 2 root root 4096 Jul 24 15:54 allure-docker-api
drwxr-xr-x 7 root root 4096 Jul 25 01:29 allure-report
drwxrwxr-x 0 1000 1000 0 Jul 25 01:18 allure-results
-rwxr-xr-x 1 root root 795 Jul 24 15:15 checkAllureResultsFiles.sh
-rwxr-xr-x 1 root root 286 Jul 24 16:03 cleanAllureHistory.sh
-rwxr-xr-x 1 root root 61 Jun 11 11:10 generateAllureReport.sh
-rwxr-xr-x 1 root root 245 Jul 24 15:14 keepAllureHistory.sh
-rwxr-xr-x 1 root root 240 Jul 24 13:44 runAllure.sh
-rwxr-xr-x 1 root root 49 Dec 19 2018 runAllureAPI.sh
-rw-r--r-- 1 root root 7 Jul 24 15:54 version

from allure-docker-service.

fescobar avatar fescobar commented on September 28, 2024

@anrock1985 let me check and see in detail. I will have news in a few days.

from allure-docker-service.

fescobar avatar fescobar commented on September 28, 2024

I've found another issue not related to that.
If you want to mount a volume in docker you need to have a directory created in advance. The same it's not a good idea to have the allure-results inside the target directory because each time you run a command surely you need to clean first with mvn clean, for that reason it doesn't exist that directory. You can put that directory outside the target like this: https://github.com/fescobar/allure-docker-service/tree/master/allure-docker-java-testng-example
If you don't want to do that you should create the allure-results directory before starting docker container using any script.

Please, remove your local beta image and try again with my suggestions. I've updated the beta version.

from allure-docker-service.

anrock1985 avatar anrock1985 commented on September 28, 2024

removed beta image

moved allure-results to project base dir

dev26:~/IdeaProjects/ntk-crm-autotests$ docker run -p 4040:4040 -p 5050:5050 -e CHECK_RESULTS_EVERY_SECONDS=3 -e KEEP_HISTORY="TRUE" -v ${PWD}/allure-results:/app/allure-results --name allure-docker-service frankescobar/allure-docker-service:beta

all works like it should, thanks for great work!

Before that, i tried mvn test (without clean). For some reason, even if all folders in ./target have not been removed, just updated, linux "ls" command could not see folder structure. After "cd ../ & cd target", "ls" was starting to see folder structure again. Its weird

trends

from allure-docker-service.

fescobar avatar fescobar commented on September 28, 2024

@anrock1985 Thanks to you. In a few mins I will release the version 2.12.1 in there you will the history working. I will remove the beta after that.

from allure-docker-service.

fescobar avatar fescobar commented on September 28, 2024

@anrock1985 Version 2.12.1 was released, don't use beta. Documentation is up to date on README.md

from allure-docker-service.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.