navcontainerhelper
navcontainerhelper copied to clipboard
improve output to match build system
github actions and azure pipelines use different environment variables we could use to identify the running system. we should use this possibility to output formatting commands for the given system.
I don't think testing for various environment variables deep inside ContainerHelper is the right approach. I would accept a PR with 2 new properties in ContainerHelper config called IsGitHubActions and IsAzureDevOps - both default to $false. Then I would have two functions in HelperFunctions called WriteGroupStart and WriteGroupEnd with a message parameter, which would check for the two settings. also - all places in Run-AlPipeline, where a group start is called - this function should be used and the value of githubActions in Run-AlPipeline should be defaulted to the setting - and the value of the parameter should be written into the bccontainerhelperconfig.IsGitHubActions (for that session).
i wanted to change as little as possible, hence the somewhat inelegant solution. your approach is of course better.
but why shouldn't we automatically recognize the build system when loading the bccontainerhelper (possibly overridable by a setting)? if it only works nicely when the user activates a setting, most people will overlook it and not have the best experience.
@freddydk can you have another look on this?
@ChrisBlankDe - please fix the remaining two issues and let's get this in
Thanks :-)