Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/pipelines/customize-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ You can add more **scripts** or **tasks** as steps to your pipeline. A task is a
- task: PublishCodeCoverageResults@2
inputs:
summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/site/jacoco/jacoco.xml" # Path to summary files
reportDirectory: "$(System.DefaultWorkingDirectory)/**/site/jacoco" # Path to report directory
failIfCoverageEmpty: true # Fail if code coverage results are missing
```

Expand Down
8 changes: 3 additions & 5 deletions docs/pipelines/ecosystems/customize-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ To publish test results, use the [Publish test results](/azure/devops/pipelines/

### Publish code coverage results

If your test scripts run a code coverage tool such as [Istanbul](https://github.com/istanbuljs), add the [Publish code coverage results](/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v1) task. You can then see coverage metrics in the build summary and download HTML reports for further analysis.
If your test scripts run a code coverage tool such as [Istanbul](https://github.com/istanbuljs), add the [Publish code coverage results](/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2) task. You can then see coverage metrics in the build summary and download HTML reports for further analysis.

The task expects Cobertura or JaCoCo reporting output. Ensure that your code coverage tool runs with the necessary options to generate the right output, for example `--report cobertura`.

Expand Down Expand Up @@ -545,14 +545,12 @@ To publish JUnit or xUnit test results to the server, add the [Publish test resu
testRunTitle: 'Test results for JavaScript using gulp'
```

To publish code coverage results to the server, add the [Publish code coverage results](/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v1) task. You can find coverage metrics in the build summary, and you can download HTML reports for further analysis.
To publish code coverage results to the server, add the [Publish code coverage results](/azure/devops/pipelines/tasks/reference/publish-code-coverage-results-v2) task. You can find coverage metrics in the build summary, and you can download HTML reports for further analysis.

```yaml
- task: PublishCodeCoverageResults@1
- task: PublishCodeCoverageResults@2
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/*coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/coverage'
```

#### [Classic](#tab/classic)
Expand Down
3 changes: 1 addition & 2 deletions docs/pipelines/ecosystems/customize-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ Add the [Publish code coverage results task](/azure/devops/pipelines/tasks/refer
```yaml
- task: PublishCodeCoverageResults@2
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
Comment thread
kk-hasuwae marked this conversation as resolved.
```

Expand Down Expand Up @@ -220,4 +219,4 @@ You can also use Azure Pipelines to [build an image](containers/build-image.md)
- [Getting Started with Python in VS Code](https://code.visualstudio.com/docs/python)
- [Build and publish a Python app](python.md)
- [Azure Pipelines task reference](/azure/devops/pipelines/tasks/reference)
- [Azure Pipelines agents](../agents/agents.md)
- [Azure Pipelines agents](../agents/agents.md)
1 change: 0 additions & 1 deletion docs/pipelines/ecosystems/dotnet-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,6 @@ To run tests and publish code coverage with Coverlet:
- task: PublishCodeCoverageResults@2
displayName: 'Publish code coverage report'
inputs:
codeCoverageTool: 'Cobertura'
summaryFileLocation: '$(Agent.TempDirectory)/**/coverage.cobertura.xml'
```

Expand Down
4 changes: 0 additions & 4 deletions docs/pipelines/ecosystems/ruby.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ Add the [Publish Code Coverage Results](/azure/devops/pipelines/tasks/reference/
```yaml
- task: PublishCodeCoverageResults@2
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
Comment thread
kk-hasuwae marked this conversation as resolved.
reportDirectory: '$(System.DefaultWorkingDirectory)/**/coverage'
failIfCoverageEmpty: true
```

Expand Down Expand Up @@ -190,9 +188,7 @@ steps:

- task: PublishCodeCoverageResults@2
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/coverage'
failIfCoverageEmpty: true
displayName: 'Publish code coverage'
```