dotnet / dotnet/msbuild

Enhance the MSBuild output experience for CI/CD providers

Open
#12,737 4 comments 1 reaction 1 assignee Assigned to @VolPlita View on GitHub
Area: Application Area: Logging User Experience
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

### Summary

MSBuild today doesn't nicely integrate into CI/CD providers, so diagnostics from the build are not reported in a way that providers can easily integrate into their summaries/displays. We should create provider-specific loggers and detections that auto-enable those providers in lieu of any explicit ConsoleLogger or TerminalLogger specification by the user.

### Background and Motivation

This is a relatively simple way to enhance the user experience of MSBuild that is straightforward to accomplish.

### Proposed Feature

We should create new loggers for

* GitHub Actions
* Azure DevOps
* GitLab
* Other user-suggested providers

To reduce the duplication of those loggers, we should build these as different 'formatters' on top of the better logical model that https://github.com/dotnet/msbuild/pull/12587 introduces.

Each of these loggers should
* expose a detection criteria for if that logger should be used that's based on the environment variables described by that CI/CD provider in their documentation
* use the provider-specific mechanisms for communicating diagnostics, source files and locations, and additional data as described by the CI/CD provider in their documentation
* be a 'distributed logger' in MSBuild parlance so that we can filter events from worker nodes that are sent to the central node
* if the CI/CD provider supports reporting 'progress' then the per-node information exposed by #12587 can be used to drive that experience

When MSBuild's command line is processing the Logger configuration to use, if neither console logger nor terminal logger have been _explicitly_ specified then the available CI/CD provider-specific loggers are checked to see if any are applicable to the current execution environment. If there is one and only one match, that logger should be used instead of the console or terminal logger.

### Alternative Designs

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.