Ejemplo n.º 1
0
        private void Integrate()
        {
            Log.Info(string.Format("{0}:Begin", System.Reflection.MethodBase.GetCurrentMethod().Name));
            // should we integrate this pass?
            bool ShouldIntegration = this.ShouldRunIntegration();

            if (ShouldIntegration)
            {
                IntegrationStatus status = IntegrationStatus.Unknown;
                try
                {
                    Log.Info(string.Format("{0}.{1}:Before _integratable.RunIntegration", System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.Name, System.Reflection.MethodBase.GetCurrentMethod().Name));
                    status = _integratable.RunIntegration(this.IntegrationResult).Status;
                    Log.Info(string.Format("{0}.{1}:results.Status={2}", System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.Name, System.Reflection.MethodBase.GetCurrentMethod().Name, status.ToString()));
                    Log.Info(string.Format("{0}.{1}:After _integratable.RunIntegration", System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.Name, System.Reflection.MethodBase.GetCurrentMethod().Name));
                }
                catch (Exception ex)
                {
                    Log.Error(ex);
                }

                // notify the schedule whether the build was successful or not
                Log.Info(string.Format("{0}.{1}:Before _trigger.IntegrationCompleted", System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.Name, System.Reflection.MethodBase.GetCurrentMethod().Name));
                if (status != IntegrationStatus.Unknown && status != IntegrationStatus.Exception)
                {
                    _trigger.IntegrationCompleted();
                }
                Log.Info(string.Format("{0}.{1}:After _trigger.IntegrationCompleted", System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.Name, System.Reflection.MethodBase.GetCurrentMethod().Name));
            }
            else
            {
                _trigger.IntegrationNotRun();
            }
            Log.Info(string.Format("{0}:End", System.Reflection.MethodBase.GetCurrentMethod().Name));
        }
 /// <summary>
 /// Notification of exiting the integration queue. This could be due to a single project completing,
 /// a pending integration being cancelled or due to all projects being removed from the queue.
 /// </summary>
 public void NotifyExitingIntegrationQueue(bool isPendingItemCancelled)
 {
     if (isPendingItemCancelled)
     {
         // User has cancelled a build request that has not yet started.
         if (integrationQueue.GetNextRequest(project) == null)
         {
             // We cancelled the only request for this project in the queue
             project.NotifySleepingState();
         }
         else
         {
             // We cancelled the pending request but there is one still building
             // We do not touch the state as will leave project in "Building" state.
         }
     }
     else
     {
         // The project at the front of the queue has completed.
         if (!integrationQueue.HasItemPendingOnQueue(project))
         {
             // Nothing is pending on the queue for this project.
             project.NotifySleepingState();
         }
         else
         {
             // State should go to pending as we still have an item on the queue
             project.NotifyPendingState();
         }
     }
     trigger.IntegrationCompleted();
 }
Ejemplo n.º 3
0
        private void Integrate()
        {
            // should we integrate this pass?
            bool ShouldIntegration = this.ShouldRunIntegration();

            if (ShouldIntegration)
            {
                try
                {
                    _integratable.RunIntegration(this.IntegrationResult);
                }
                catch (Exception ex)
                {
                    Log.Error(ex);
                }

                // notify the schedule whether the build was successful or not
                _trigger.IntegrationCompleted();
            }
        }
Ejemplo n.º 4
0
 public void IntegrationCompleted()
 {
     InnerTrigger.IntegrationCompleted();
 }