Skip to content

Commit

Permalink
Document Annotations (#256)
Browse files Browse the repository at this point in the history
* Document Annotations

* Add JUnit to dictionary
  • Loading branch information
fkorotkov authored Apr 22, 2019
1 parent e2e4e4b commit 9eeeb70
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ git
go-git
gradle
iOS
JUnit
lifecycle
macOS
namespace
Expand Down
15 changes: 15 additions & 0 deletions docs/guide/writing-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ build_and_test_task:
always:
junit_artifacts:
path: "**/test-results/**/*.xml"
format: junit
```

!!! tip "URL to the latest artifacts"
Expand All @@ -184,6 +185,20 @@ build_and_test_task:
```yaml
https://api.cirrus-ci.com/v1/artifact/github/<USER OR ORGANIZATION>/<REPOSITORY>/<TASK NAME>/<ARTIFACTS NAME>/<PATH>
```

### Artifact Format

Cirrus CI supports parsing artifacts in order to extract information that can be presented in the UI for better user experience.
Simply use `format` field of an artifact instruction to specify artifact's format:

```yaml
junit_artifacts:
path: "**/test-results/**/*.xml"
format: junit
```

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)
what kind of formats Cirrus CI should support next!

## Execution Behavior of Instructions

Expand Down

0 comments on commit 9eeeb70

Please sign in to comment.