public static AppVeyorProjectHistory AppVeyorProjectHistory(this ICakeContext context, AppVeyorSettings settings, string accountName, string projectSlug, int recordsPerPage, int?startBuildId = null, string branch = null) { var appVeyor = AppVeyorClient.Create(settings.ApiToken); return(appVeyor.GetProjectHistory(accountName, projectSlug, recordsPerPage, startBuildId, branch).Result); }
public static void AppVeyorClearCache(this ICakeContext context, AppVeyorSettings settings, string accountName, string projectSlug) { var appVeyor = AppVeyorClient.Create(settings.ApiToken); appVeyor.ClearCache(accountName, projectSlug).Wait(); }
public static List <AppVeyorProject> AppVeyorProjects(this ICakeContext context, AppVeyorSettings settings) { var appVeyor = AppVeyorClient.Create(settings.ApiToken); return(appVeyor.GetProjects().Result); }
public static AppVeyorProjectBuild AppVeyorProjectLastBuild(this ICakeContext context, AppVeyorSettings settings, string accountName, string projectSlug) { var appVeyor = AppVeyorClient.Create(settings.ApiToken); return(appVeyor.GetProjectLastBuild(accountName, projectSlug).Result); }
public static AppVeyorProjectBuild AppVeyorProjectLastSuccessfulBuild(this ICakeContext context, AppVeyorSettings settings, string accountName, string projectSlug, string branch = null, int?beforeBuildId = null) { var appVeyor = AppVeyorClient.Create(settings.ApiToken); AppVeyorProjectBuild lastSuccess = null; int?startBuildId = beforeBuildId; while (lastSuccess == null) { var history = appVeyor.GetProjectHistory(accountName, projectSlug, 2, startBuildId: startBuildId).Result; if (history == null || history.Builds == null || history.Builds.Count <= 0) { break; } foreach (var build in history.Builds) { if (build.Status.Equals("success", StringComparison.OrdinalIgnoreCase)) { lastSuccess = new AppVeyorProjectBuild { Project = history.Project, Build = build, }; break; } } startBuildId = history.Builds.Last().BuildId; } return(lastSuccess); }
public static AppVeyorProjectHistory AppVeyorProjectHistory (this ICakeContext context, AppVeyorSettings settings, string accountName, string projectSlug, int recordsPerPage, int? startBuildId = null, string branch = null) { var appVeyor = AppVeyorClient.Create (settings.ApiToken); return appVeyor.GetProjectHistory (accountName, projectSlug, recordsPerPage, startBuildId, branch).Result; }
public static List<AppVeyorProject> AppVeyorProjects (this ICakeContext context, AppVeyorSettings settings) { var appVeyor = AppVeyorClient.Create (settings.ApiToken); return appVeyor.GetProjects ().Result; }
public static void AppVeyorClearCache(this ICakeContext context, AppVeyorSettings settings, string accountName, string projectSlug) { var appVeyor = AppVeyorClient.Create(settings.ApiToken); appVeyor.ClearCache (accountName, projectSlug).Wait(); }
public static AppVeyorProjectBuild AppVeyorProjectLastSuccessfulBuild (this ICakeContext context, AppVeyorSettings settings, string accountName, string projectSlug, string branch = null, int? beforeBuildId = null) { var appVeyor = AppVeyorClient.Create (settings.ApiToken); AppVeyorProjectBuild lastSuccess = null; int? startBuildId = beforeBuildId; while (lastSuccess == null) { var history = appVeyor.GetProjectHistory (accountName, projectSlug, 2, startBuildId: startBuildId).Result; if (history == null || history.Builds == null || history.Builds.Count <= 0) break; foreach (var build in history.Builds) { if (build.Status.Equals ("success", StringComparison.InvariantCultureIgnoreCase)) { lastSuccess = new AppVeyorProjectBuild { Project = history.Project, Build = build, }; break; } } startBuildId = history.Builds.Last ().BuildId; } return lastSuccess; }
public static AppVeyorProjectBuild AppVeyorProjectLastBuild (this ICakeContext context, AppVeyorSettings settings, string accountName, string projectSlug) { var appVeyor = AppVeyorClient.Create (settings.ApiToken); return appVeyor.GetProjectLastBuild (accountName, projectSlug).Result; }