feat(ado-improvements-1): Pipeline specific formatting #1051
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Details
In #1048, it was pointed out that we have a requirement for pipeline-specific formatting. Summarizing from ADO docs and Workflow docs, we have the following matrix of formatting:
##[error]
::error::
##[warning]
::warning::
##[debug]
::debug::
##[group]
::group::
##[endgroup]
::endgroup::
To this end, we've modified the
Logger
andLogLevel
use the following API's, LogLevel, and generic tags:Logger
APILogLevel
Logger
LogError
error
[error]
LogWarning
warning
[warning]
LogDebug
debug
[debug]
LogInfo
info
[info]
StartGroup
group
[group]
EndGroup
endgroup
[endgroup]
Then we create pipeline-specific stdout transformers (
adoStdoutTransformer
andghStdoutTransformer
) to convert the generic output to the pipeilne-specific output.Motivation
Improve #950, also includes changes from #1048 (which need this infrastucture to work correctly)
Context
There is some duplicated code between
adoStdoutTransformer
andghStdoutTransformer
. There are probably opportunities to improve this, but since it was a very small part of the whole change, and since I was having build problems, I left that for another PR.I had a few false starts on this, so trying to review this per commit might add confusion, not clarity.
Pull request checklist
yarn test
)<rootDir>/test-results/unit/coverage
yarn precheckin
)