navcontainerhelper icon indicating copy to clipboard operation
navcontainerhelper copied to clipboard

improve output to match build system

Open ChrisBlankDe opened this issue 11 months ago • 3 comments

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.

ChrisBlankDe avatar Mar 19 '24 08:03 ChrisBlankDe

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).

freddydk avatar Mar 21 '24 06:03 freddydk

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.

ChrisBlankDe avatar Apr 04 '24 11:04 ChrisBlankDe

@freddydk can you have another look on this?

ChrisBlankDe avatar Jun 18 '24 07:06 ChrisBlankDe

@ChrisBlankDe - please fix the remaining two issues and let's get this in

freddydk avatar Aug 21 '24 06:08 freddydk

Thanks :-)

freddydk avatar Aug 26 '24 10:08 freddydk