Use CircleCI version 2.1 at the top of your .circleci/config.yml file.
1
version: 2.1
Add the orbs
stanza below your version, invoking the orb:
1
2
orbs:
allure: ayte/allure@0.1.3
Use allure
elements in your existing workflows and jobs.
Opt-in to use of uncertified orbs on your organization’s Security settings page.
Installs Allure Framework and registers it as /usr/local/bin/allure
PARAMETER | DESCRIPTION | REQUIRED | DEFAULT | TYPE |
---|---|---|---|---|
version | Allure version to use | No | 2.13.1 | string |
Generates report using Allure Framework
PARAMETER | DESCRIPTION | REQUIRED | DEFAULT | TYPE |
---|---|---|---|---|
configuration-path | Path to Allure configuration, uses default one if omitted | No | /usr/local/share/allure/config/allure.yml | string |
target-path | Path for report directory | No | allure-report | string |
results-path | Path to directory with test results | No | allure-results | string |
artifact-path | Path that will be used when storing result as artifact | No | Report/Allure | string |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# This code is licensed from CircleCI to the user under the MIT license.
# See here for details: https://circleci.com/developer/ja/orbs/licensing
version: '2.1'
description: Orb providing support for [Allure Framework](https://github.com/allure-framework/allure2)
commands:
install:
description: Installs Allure Framework and registers it as /usr/local/bin/allure
parameters:
version:
description: Allure version to use
type: string
default: 2.13.1
steps:
- run:
name: Allure archive download
command: curl -L https://github.com/allure-framework/allure2/releases/download/<< parameters.version >>/allure-commandline-<< parameters.version >>.zip -o /tmp/allure.zip
- run:
name: Archive extraction
command: unzip /tmp/allure.zip
- run:
name: Allure installation
command: sudo mv allure-<< parameters.version >> /usr/local/share/allure
- run:
name: Allure binary symlinking
command: sudo ln -s /usr/local/share/allure/bin/allure /usr/local/bin/allure
report:
description: Generates report using Allure Framework
parameters:
configuration-path:
description: Path to Allure configuration, uses default one if omitted
type: string
default: /usr/local/share/allure/config/allure.yml
target-path:
description: Path for report directory
type: string
default: allure-report
results-path:
description: Path to directory with test results
type: string
default: allure-results
artifact-path:
description: Path that will be used when storing result as artifact
type: string
default: Report/Allure
steps:
- run:
name: Allure report generation (<< parameters.results-path >> -> << parameters.target-path >>)
command: |
allure generate \
--config << parameters.configuration-path >> \
--report-dir << parameters.target-path >> \
<< parameters.results-path >>
- store_artifacts:
path: << parameters.target-path >>
destination: << parameters.artifact-path >>