/// <summary> /// Run the resulting target from building the build pipeline of this build configuration. /// </summary> /// <returns></returns> public RunStepResult Run() { var pipeline = GetBuildPipeline(); if (!CanRun(out var reason)) { return(RunStepResult.Failure(this, pipeline?.RunStep, reason)); } return(pipeline.Run(this)); }
/// <summary> /// Run the resulting target from building the <see cref="BuildPipeline"/> of this <see cref="BuildSettings"/>. /// </summary> /// <returns></returns> public RunStepResult Run() { var pipeline = GetBuildPipeline(); if (!CanRun(out var reason)) { return(RunStepResult.Failure(this, pipeline?.RunStep, reason)); } if (pipeline == null) { throw new NullReferenceException(nameof(pipeline)); } return(pipeline.Run(this)); }
/// <summary> /// Run this <see cref="BuildPipeline"/>. /// This will attempt to run the build target produced from building this <see cref="BuildPipeline"/>. /// </summary> /// <param name="config"></param> /// <returns>The result of running this <see cref="BuildPipeline"/>.</returns> public RunStepResult Run(BuildConfiguration config) { if (!CanRun(config, out var reason)) { return(RunStepResult.Failure(config, RunStep, reason)); } try { return(RunStep.Start(config)); } catch (Exception exception) { return(RunStepResult.Exception(config, RunStep, exception)); } }
/// <summary> /// Run this <see cref="BuildPipeline"/>. /// This will attempt to run the build target produced from building this <see cref="BuildPipeline"/>. /// </summary> /// <param name="settings"></param> /// <returns>The result of running this <see cref="BuildPipeline"/>.</returns> public RunStepResult Run(BuildSettings settings) { if (!CanRun(settings, out var reason)) { return(RunStepResult.Failure(settings, RunStep, reason)); } try { return(RunStep.Start(settings)); } catch (Exception exception) { return(RunStepResult.Exception(settings, RunStep, exception)); } }
public RunStepResult Failure(BuildConfiguration config, string message) => RunStepResult.Failure(config, this, message);
public RunStepResult Success(BuildConfiguration config, IRunInstance instance) => RunStepResult.Success(config, this, instance);
public RunStepResult Failure(BuildSettings settings, string message) => RunStepResult.Failure(settings, this, message);
public RunStepResult Success(BuildSettings settings, IRunInstance instance) => RunStepResult.Success(settings, this, instance);