Tidied up some of the logging to the build log by adding a wrapper class to do some formatting and pulling out hard-coded prefixing. Also improved the commenting through the TeamCity plugin.
Explicitly set `phabricatorTriggeredBuild` to false on exit points on `AgentBuildExtension` because we are seeing behaviour that suggest the default value is not used in the `sourcesUpdated` step
Add a TeamCity agent to which run after the VCS sources have been applied to trigger arcanist patch and pull in any changes from the specified Phabricator revision onto master and verify they build.
Add a new field on the build feature dialog allowing the user to specify where arcanist command is located on the agent. We will need this information to execute the patching process upon which we will be building.
This commit also add Command and CommandBuilder into Common which we will be using to execute arcanist to apply the `arc patch` during the build so we can actually build the changes from the revision,
Also moved the three logging based files into a sub-folder causing many file updates of just an import.
In the past TeamCity allowed us to spoof the branch we ran a build configuration on. We were going to utilise this with each differential revision having its own TeamCity branch. However in a recent change (post 2018.2.2) branches specified in builds must have a corresponding VCS branch otherwise the build is marked as failed. We therefore don't need a branch name within the teamcity plugin.
We are still passing through the REVISION_BUILD to allow us to display the snapshot within TeamCity.
We have added an agent side plugin which will be used to patch in the changes from a phabricator differential. We verify all the required settings are in place and enable the patching process after the repository have been cloned. Currently arcanist has been implemented to pull in the diff we are going to build upon that is the next step.
There was an issue in which we assumed that the phabricator settings were always set, this is obviously incorrect so check that they exist before attempting to add them to shared parameters for the agent to use.
Also gone through and tidied up a few loose ends highlighted by SonarQube.
Allow either the agent or server loggers to be used with the wrapper class by making the set method use the interface rather than concrete class. Also rename the interface away from C# style naming.
Since there is limited access to parameters in the early stages of a build we need to pass through the shared parameters from the server to the agent. Once the BuildContext has these parameters we can then go forward and check all the required information is present before trying to patch in our revision changes.
We were previously setting the phabricator variabels we needs within builds to be environment variables however there are issues arount pulling out ENVS when on the agent within `buildStarted` step. To resolve the lack of environment variable access we are going to use sharedParameters which also doesn't work with variables prefixed with `env.` hence the rename.
We are now parsing the phabractor variables and checking the ones we need are present. If there is no phabricator url then the process end likewise if there is a missing configuration variable the process ends too.
To make sure there are no naming conflicts with teamcity environment variable we are renaming the vars injected to the build via the harbormaster trigger.
Add a build tracker that is spun up when a bulid is created. The tracker will collect environment variables and wait for the build to finish before reporting the results.