Skip to content

Commit 9eeeb70

Browse files
authored
Document Annotations (#256)
* Document Annotations * Add JUnit to dictionary
1 parent e2e4e4b commit 9eeeb70

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.spelling

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ git
102102
go-git
103103
gradle
104104
iOS
105+
JUnit
105106
lifecycle
106107
macOS
107108
namespace

docs/guide/writing-tasks.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ build_and_test_task:
175175
always:
176176
junit_artifacts:
177177
path: "**/test-results/**/*.xml"
178+
format: junit
178179
```
179180

180181
!!! tip "URL to the latest artifacts"
@@ -184,6 +185,20 @@ build_and_test_task:
184185
```yaml
185186
https://api.cirrus-ci.com/v1/artifact/github/<USER OR ORGANIZATION>/<REPOSITORY>/<TASK NAME>/<ARTIFACTS NAME>/<PATH>
186187
```
188+
189+
### Artifact Format
190+
191+
Cirrus CI supports parsing artifacts in order to extract information that can be presented in the UI for better user experience.
192+
Simply use `format` field of an artifact instruction to specify artifact's format:
193+
194+
```yaml
195+
junit_artifacts:
196+
path: "**/test-results/**/*.xml"
197+
format: junit
198+
```
199+
200+
Currently Cirrus CI can only parse JUnit XML artifacts but many tools use this format already. Please [let us know](https://github.com/cirruslabs/cirrus-ci-annotations/issues/new)
201+
what kind of formats Cirrus CI should support next!
187202

188203
## Execution Behavior of Instructions
189204

0 commit comments

Comments
 (0)