Skip to content

Commit 5647a05

Browse files
authored
Merge pull request #175 from fescobar/beta
Updating Allure Framework to 2.17.0
2 parents d043dcc + cc14c0c commit 5647a05

File tree

7 files changed

+65
-14
lines changed

7 files changed

+65
-14
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
env:
1414
DOCKER_IMAGE: frankescobar/allure-docker-service
15-
ALLURE_RELEASE: 2.13.8
15+
ALLURE_RELEASE: 2.17.0
1616
QEMU_VERSION: v4.0.0
1717
DOCKER_CLI_EXPERIMENTAL: enabled
1818

README.md

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ The following table shows the provided Manifest Lists.
9696

9797
| **Tag** | **allure-docker-service Base Image** |
9898
|----------------------------------------|---------------------------------------------------|
99-
| latest, 2.13.8 | frankescobar/allure-docker-service:2.13.8-amd64 |
100-
| | frankescobar/allure-docker-service:2.13.8-arm32v7 |
101-
| | frankescobar/allure-docker-service:2.13.8-arm64v8 |
99+
| latest, 2.17.0 | frankescobar/allure-docker-service:2.17.0-amd64 |
100+
| | frankescobar/allure-docker-service:2.17.0-arm32v7 |
101+
| | frankescobar/allure-docker-service:2.17.0-arm64v8 |
102102

103103
## USAGE
104104
### Generate Allure Results
@@ -717,7 +717,7 @@ You can switch the version container using `frankescobar/allure-docker-service:$
717717
Docker Compose example:
718718
```sh
719719
allure:
720-
image: "frankescobar/allure-docker-service:2.13.8"
720+
image: "frankescobar/allure-docker-service:2.17.0"
721721
```
722722
or using latest version:
723723

@@ -750,6 +750,49 @@ If you use this option, the only way to generate a new report up to date it's us
750750
CHECK_RESULTS_EVERY_SECONDS: NONE
751751
```
752752

753+
- `CHECK_RESULTS_EVERY_SECONDS=3` It's only useful for executions in your`LOCAL` machine. With this option ENABLED the container detects any changes in the `allure-results` directory. Every time detects a new file, the container will generate a new report. The workflow will be the next:
754+
755+
1. Start `allure-docker-service` via docker-compose mounting the `allure-results` volume that your project will use to storage the results files. It's recommended to use this configuration [SINGLE PROJECT - LOCAL REPORTS](#SINGLE-PROJECT---LOCAL-REPORTS)
756+
2. Generate your allure results with any Allure Framework according technology (Allure/Cucumber/Java, Allure/Specflow/C#, Allure/CucumberJS/NodeJS, etc). Your results will be stored in a directory named `allure-results` in any directory inside your project. Remember to use the same location that you are mounting when you start the docker container in the previous step. Also, never remove that `allure-results` directory, otherwise docker will lose the reference to that volume.
757+
3. Every time new results files are generated during every test execution, automatically the containers will detects those changes and it will generate a new report.
758+
4. You will see the report generated
759+
5. If you see multiple reports that it doesn't represent the real quantity of executions it's because the report is generated each time detects changes in the `allure-results` directory including existing previous results files in that directory. That's the reason is only useful locally.
760+
761+
- `CHECK_RESULTS_EVERY_SECONDS=NONE`. This option is useful when you deploy `allure-docker-service` in a server and you are planning to feed results from any CI tool. With this option DISABLED the container won't detect any changes in the `allure-results` directory (Otherwise, it's higly cost if you handle multiple projects in terms of processor comsuption). The report won't be generated until you generate the report on demand using the API `GET /generate-report`. This will be the workflow:
762+
763+
From any server machine:
764+
1. Deploy `allure-docker-service` using [Kubernetes](#deploy-using-kubernetes) or any other tool in any server. It's recommended to use this configuration [MULTIPLE PROJECTS - REMOTE REPORTS](#MULTIPLE-PROJECTS---REMOTE-REPORTS).
765+
2. Make sure the server is accessible from where your scripts are requesting the API.
766+
767+
From your automation tests project:
768+
1. Request endpoint `GET /clean-results` (specify project if it's needed) to clean all existing results. This will be `BEFORE` starting any test execution.
769+
2. Execute your tests and generate your allure results with any Allure Framework according technology (Allure/Cucumber/Java, Allure/Specflow/C#, Allure/CucumberJS/NodeJS, etc).
770+
3. Once all your tests were executed, send all your results generated recently using the endpoint `POST /send-results` (specify project if it's needed).
771+
4. You won't see any report generated because at the moment you have only your results stored in the container.
772+
5. Now that you have all the info (allure results files) in the server, you can request the endpoint `GET /generate-report`. This action will build the report to be show.
773+
774+
775+
NOTE:
776+
- Scripts to interact with the API: [Send results through API](#send-results-through-api) (Check commented code in the scripts).
777+
778+
- If you execute `GET /generate-report` endpoint after every test execution, you will see multiple reports that doesn't represent your executions, that is because the container is building the report taking in count existing results files. For that reason, we use the `GET /clean-results` endpoint before starting any new execution to delete all results not related the current execution.
779+
780+
Resume:
781+
```sh
782+
---EXECUTION 1---
783+
1. Clean results files to avoid data from previous results files - GET /clean-results
784+
2. Execute Suite1
785+
3. Execute Suite2
786+
4. Execute Suite3
787+
5. Wait for all suites to finish
788+
6. Send results using endpoints - POST /send-results
789+
7. Generate report using endpoint - GET /generate-report
790+
Report will include all suites results from this execution.
791+
792+
---EXECUTION 2---
793+
Same steps from previous execution (don't forget to clean results first)
794+
```
795+
753796
#### Keep History and Trends
754797
`Available from Allure Docker Service version 2.12.1`
755798
@@ -1338,9 +1381,13 @@ If you want to use docker without sudo, read following links:
13381381
- https://docs.docker.com/engine/installation/linux/linux-postinstall/#manage-docker-as-a-non-root-user
13391382
- https://stackoverflow.com/questions/21871479/docker-cant-connect-to-docker-daemon
13401383
1384+
### Develop locally with Docker-Compose
1385+
```sh
1386+
docker-compose -f docker-compose-dev.yml up --build
1387+
```
13411388
### Build image
13421389
```sh
1343-
docker build -t allure-release -f docker-custom/Dockerfile.bionic-custom --build-arg ALLURE_RELEASE=2.13.8 .
1390+
docker build -t allure-release -f docker-custom/Dockerfile.bionic-custom --build-arg ALLURE_RELEASE=2.17.0 .
13441391
```
13451392
### Run container
13461393
```sh
@@ -1391,5 +1438,5 @@ docker run -d -p 5050:5050 frankescobar/allure-docker-service
13911438
```
13921439
### Download specific tagged image registered (Example)
13931440
```sh
1394-
docker run -d -p 5050:5050 frankescobar/allure-docker-service:2.13.8
1441+
docker run -d -p 5050:5050 frankescobar/allure-docker-service:2.17.0
13951442
```

allure-docker-api/.pylintrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,8 @@ disable=
33
missing-module-docstring,
44
missing-function-docstring,
55
broad-except,
6-
raise-missing-from
6+
raise-missing-from,
7+
consider-using-f-string,
8+
consider-using-with,
9+
unspecified-encoding,
10+
redefined-outer-name

deprecated/.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ language: bash
88

99
env:
1010
global:
11-
- ALLURE_RELEASE=2.13.8
11+
- ALLURE_RELEASE=2.17.0
1212
- TARGET=frankescobar/allure-docker-service
1313
- QEMU_VERSION=v4.0.0
1414
matrix:

docker-compose-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
context: ../allure-docker-service
1111
dockerfile: docker-custom/Dockerfile.bionic-custom
1212
args:
13-
ALLURE_RELEASE: "2.13.8"
13+
ALLURE_RELEASE: "2.17.0"
1414
environment:
1515
DEV_MODE: 0
1616
CHECK_RESULTS_EVERY_SECONDS: NONE

docker-custom/Dockerfile.bionic-custom

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
ARG ARCH=amd64
22
ARG JDK=adoptopenjdk:11-jre-openj9-bionic
33
ARG BUILD_DATE
4-
ARG BUILD_VERSION=2.13.8-custom
4+
ARG BUILD_VERSION=2.17.0-custom
55
ARG BUILD_REF=na
6-
ARG ALLURE_RELEASE=2.13.8
7-
ARG ALLURE_REPO=https://dl.bintray.com/qameta/maven/io/qameta/allure/allure-commandline
6+
ARG ALLURE_RELEASE=2.17.0
7+
ARG ALLURE_REPO=https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline
88
ARG UID=1000
99
ARG GID=1000
1010

docker/Dockerfile.bionic

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARG BUILD_DATE
44
ARG BUILD_VERSION
55
ARG BUILD_REF
66
ARG ALLURE_RELEASE=NONE
7-
ARG ALLURE_REPO=https://dl.bintray.com/qameta/maven/io/qameta/allure/allure-commandline
7+
ARG ALLURE_REPO=https://repo.maven.apache.org/maven2/io/qameta/allure/allure-commandline
88
ARG QEMU_ARCH
99
ARG UID=1000
1010
ARG GID=1000

0 commit comments

Comments
 (0)