Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add provider name to BuildSystem #2429

Closed
gitfool opened this issue Jan 4, 2019 · 0 comments
Closed

Add provider name to BuildSystem #2429

gitfool opened this issue Jan 4, 2019 · 0 comments
Milestone

Comments

@gitfool
Copy link
Contributor

gitfool commented Jan 4, 2019

Add provider name to BuildSystem to simplify build info introspection.

This can be done with reflection to keep it simple and dynamic, as I do in Cake.Dungeon/scripts/builder.cake, so the build info introspection can easily filter the BuildSystem properties to just the relevant provider.

For example, this is what my build log is currently generating on Azure Pipelines:

2019-01-04T20:00:07.5090544Z ========================================
2019-01-04T20:00:07.5091011Z Info
2019-01-04T20:00:07.5091277Z ========================================
2019-01-04T20:00:07.5472444Z 
2019-01-04T20:00:07.5480136Z BuildSystem.TFBuild.IsRunningOnVSTS                                 true
2019-01-04T20:00:07.5480501Z BuildSystem.TFBuild.IsRunningOnTFS                                  false
2019-01-04T20:00:07.5480670Z BuildSystem.TFBuild.Environment.Repository.Branch                   master
2019-01-04T20:00:07.5480852Z BuildSystem.TFBuild.Environment.Repository.SourceVersion            93a89d64a2efc6328ac4ddf46af8b220229235cf
2019-01-04T20:00:07.5481036Z BuildSystem.TFBuild.Environment.Repository.Shelveset                "
2019-01-04T20:00:07.5481221Z BuildSystem.TFBuild.Environment.Repository.RepoName                 gitfool/Cake.Dungeon
2019-01-04T20:00:07.5484630Z BuildSystem.TFBuild.Environment.BuildDefinition.Id                  1
2019-01-04T20:00:07.5485136Z BuildSystem.TFBuild.Environment.BuildDefinition.Name                gitfool.Cake.Dungeon
2019-01-04T20:00:07.5485687Z BuildSystem.TFBuild.Environment.BuildDefinition.Version             1
2019-01-04T20:00:07.5486019Z BuildSystem.TFBuild.Environment.Build.Id                            6
2019-01-04T20:00:07.5486344Z BuildSystem.TFBuild.Environment.Build.Number                        20190104.2
2019-01-04T20:00:07.5486699Z BuildSystem.TFBuild.Environment.Build.Uri                           vstfs:///Build/Build/6
2019-01-04T20:00:07.5487052Z BuildSystem.TFBuild.Environment.Build.QueuedBy                      GitHub
2019-01-04T20:00:07.5487311Z BuildSystem.TFBuild.Environment.Build.RequestedFor                  GitHub
2019-01-04T20:00:07.5487613Z BuildSystem.TFBuild.Environment.Build.RequestedForEmail             "
2019-01-04T20:00:07.5487923Z BuildSystem.TFBuild.Environment.TeamProject.Name                    Cake.Dungeon
2019-01-04T20:00:07.5489524Z BuildSystem.TFBuild.Environment.TeamProject.Id                      76668ef0-590e-4f12-8b2f-47912845203c
2019-01-04T20:00:07.5495431Z BuildSystem.TFBuild.Environment.TeamProject.CollectionUri           https://dev.azure.com/gitfool/
2019-01-04T20:00:07.5497323Z BuildSystem.TFBuild.Environment.Agent.BuildDirectory                /home/vsts/work/1
2019-01-04T20:00:07.5497783Z BuildSystem.TFBuild.Environment.Agent.HomeDirectory                 /home/vsts/agents/2.144.0
2019-01-04T20:00:07.5498281Z BuildSystem.TFBuild.Environment.Agent.WorkingDirectory              /home/vsts/work
2019-01-04T20:00:07.5499407Z BuildSystem.TFBuild.Environment.Agent.Id                            5
2019-01-04T20:00:07.5499746Z BuildSystem.TFBuild.Environment.Agent.Name                          Hosted Agent
2019-01-04T20:00:07.5545168Z BuildSystem.TFBuild.Environment.Agent.MachineName                   "
2019-01-04T20:00:07.5547479Z BuildSystem.TFBuild.Environment.Agent.IsHosted                      true
2019-01-04T20:00:07.5547807Z 
2019-01-04T20:00:07.5548309Z Context.Environment.WorkingDirectory                                /home/vsts/work/1/s
2019-01-04T20:00:07.5549395Z Context.Environment.ApplicationRoot                                 /home/vsts/work/1/s/tools/Cake
2019-01-04T20:00:07.5549704Z Context.Environment.Platform.Is64Bit                                true
2019-01-04T20:00:07.5549980Z Context.Environment.Runtime.BuiltFramework.Identifier               .NETFramework
2019-01-04T20:00:07.5550263Z Context.Environment.Runtime.BuiltFramework.Version.Major            4
2019-01-04T20:00:07.5550502Z Context.Environment.Runtime.BuiltFramework.Version.Minor            6
2019-01-04T20:00:07.5550778Z Context.Environment.Runtime.BuiltFramework.Version.Build            1
2019-01-04T20:00:07.5551557Z Context.Environment.Runtime.BuiltFramework.Version.Revision         -1
2019-01-04T20:00:07.5552139Z Context.Environment.Runtime.BuiltFramework.Version.MajorRevision    -1
2019-01-04T20:00:07.5552801Z Context.Environment.Runtime.BuiltFramework.Version.MinorRevision    -1
2019-01-04T20:00:07.5553029Z Context.Environment.Runtime.BuiltFramework.Profile                  "
2019-01-04T20:00:07.5553300Z Context.Environment.Runtime.BuiltFramework.FullName                 .NETFramework,Version=v4.6.1
2019-01-04T20:00:07.5553553Z Context.Environment.Runtime.CakeVersion.Major                       0
2019-01-04T20:00:07.5553793Z Context.Environment.Runtime.CakeVersion.Minor                       31
2019-01-04T20:00:07.5553979Z Context.Environment.Runtime.CakeVersion.Build                       0
2019-01-04T20:00:07.5554276Z Context.Environment.Runtime.CakeVersion.Revision                    0
2019-01-04T20:00:07.5554544Z Context.Environment.Runtime.CakeVersion.MajorRevision               0
2019-01-04T20:00:07.5554784Z Context.Environment.Runtime.CakeVersion.MinorRevision               0
2019-01-04T20:00:07.5554976Z Context.Environment.Runtime.IsCoreClr                               false
2019-01-04T20:00:07.5555215Z Context.Arguments.Arguments                                         {}

This can help diagnose issues with your Cake build scripts.

@gitfool gitfool changed the title Add provider name to BuildSystem properties Add provider name to BuildSystem Jan 4, 2019
@devlead devlead added this to the v0.33.0 milestone Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants