public static void PublishJob(this ICakeContext context, Models.PublishJobSettings jobSettings, TalendCommandLineSettings settings) { CommonNullCheck(context, settings); if (jobSettings == null) { throw new ArgumentNullException(nameof(jobSettings)); } var runner = new CommandLine.Runner(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools); using (var check = new TalendCommandLineChecks(settings.Workspace ?? context.Environment.WorkingDirectory, jobSettings.ProjectName, context.Log)) { runner.PublishJob( jobSettings.ProjectName, jobSettings.JobName, jobSettings.JobGroup, jobSettings.IsSnapshot ?? true, jobSettings.IsStandalone ?? false, jobSettings.Context, jobSettings.PublishVersion, jobSettings.ArtifactRepositoryUrl, jobSettings.ArtifactRepositoryUsername, jobSettings.ArtifactRepositoryPassword, settings); } }
public static void PublishRoutes(this ICakeContext context, IEnumerable <Models.PublishRouteSettings> routeSettings, Models.PublishRouteSettings commonRouteSettings, TalendCommandLineSettings settings) { CommonNullCheck(context, settings); if (commonRouteSettings == null) { throw new ArgumentNullException(nameof(commonRouteSettings)); } var runner = new CommandLine.Runner(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools); foreach (var route in routeSettings) { using (var check = new TalendCommandLineChecks(settings.Workspace ?? context.Environment.WorkingDirectory, route.ProjectName ?? commonRouteSettings.ProjectName, context.Log)) { runner.PublishRoute( route.ProjectName ?? commonRouteSettings.ProjectName, route.RouteName ?? commonRouteSettings.RouteName, route.RouteGroup ?? commonRouteSettings.RouteGroup, route.IsSnapshot ?? commonRouteSettings.IsSnapshot ?? true, route.PublishVersion ?? commonRouteSettings.PublishVersion, route.ArtifactRepositoryUrl ?? commonRouteSettings.ArtifactRepositoryUrl, route.ArtifactRepositoryUsername ?? commonRouteSettings.ArtifactRepositoryUsername, route.ArtifactRepositoryPassword ?? commonRouteSettings.ArtifactRepositoryPassword, settings); } } }
public static void BuildRoute(this ICakeContext context, string projectName, string routeName, DirectoryPath artifactDestination, TalendCommandLineSettings settings) { CommonNullCheck(context, settings); var runner = new CommandLine.Runner(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools); runner.BuildRoute(projectName, routeName, artifactDestination, settings); }