private static void Process(IBuildStatusChange notificationChannel, BuildExecutionStatus buildStatus)
        {
            switch (buildStatus)
            {
                case BuildExecutionStatus.Succeeded:
                    notificationChannel.OnBuildSuceeded();
                    Tracing.Client.TraceInformation("Build Succeeded");
                    break;

                case BuildExecutionStatus.Failed:
                    notificationChannel.OnBuildFailed();
                    Tracing.Client.TraceInformation("Build Failed");
                    break;

                case BuildExecutionStatus.Stopped:
                    notificationChannel.OnBuildStopped();
                    Tracing.Client.TraceInformation("Build Stopped");
                    break;

                case BuildExecutionStatus.InProgress:
                    notificationChannel.OnBuildStarted();
                    Tracing.Client.TraceInformation("Build Started");
                    break;

                case
                    BuildExecutionStatus.PartiallySucceeded:
                    notificationChannel.OnBuildPartiallySucceeded();
                    Tracing.Client.TraceInformation("Build Partially Succeeded");
                    break;
            }
        }
 public override void Publish(string buildName,BuildExecutionStatus buildStatus)
 {
     foreach (string serviceAddress in _notifier.GetNotificationAddress(buildName))
     {
         BuildManagerExceptionHelper.With(serviceAddress,
             () =>
                 CreateChannel(serviceAddress)
                     .ExecuteOneWayCall(channel => Process(channel, buildStatus)),
             () => Tracing.Client.TraceInformation("About to Publish... "),
             () => Tracing.Client.TraceInformation("Sent to Publisher Target"));
     }
 }
示例#3
0
 public abstract void Publish(string buildName,BuildExecutionStatus buildStatus);