FlubuCore v2.6.0 Release Notes

    • ➕ Added option to add multiple tasks, dependencies With (anonimous) method to target with Do method.

      protected override void ConfigureTargets(ITaskContext context)
      {
          context.CreateTarget("deploy.PreProduction")
              .Do(Deploy, @"C:\Web", "AppPool_Preprod", "PreProduction");
      
          context.CreateTarget("deploy.Production")
              .Do(Deploy, @"d:\Web", "AppPool_Prod", "Production");
      }
      
      public void Deploy(ITargetFluentInterface target, string deployPath, string appPoolName, string enviromentName)
      {
          target.AddTask(x => x.IisTasks().ControlAppPoolTask(appPoolName, ControlApplicationPoolAction.Stop))
              .Do(UnzipPackage)
              .AddTask(x => x.DeleteDirectoryTask(deployPath, false).Retry(30, 5000))
              .AddTask(x => x.CreateDirectoryTask(deployPath, false))
              .AddTask(x => x.CopyDirectoryStructureTask(@"Packages\WebApi", deployPath, true))
              .AddTask(x => x.IisTasks().ControlAppPoolTask(appPoolName, ControlApplicationPoolAction.Start));
      }