public async Task DeleteTest_WithoutCrumb_Async() { var client = DefaultClient.Create(); await SetupDeleteJobAsync(client); await client.Jobs.DeleteAsync("Delete Job"); }
public void DeleteTest_WithoutCrumb() { var client = DefaultClient.Create(); SetupDeleteJob(client); client.Jobs.Delete("Delete Job"); }
public void Create(RmResource newResource) { Initialize(); _log.Info("Creating resource of type {0}", newResource.ObjectType); _defaultClient.Create(newResource); }
public async Task DeleteTest_WithCrumb() { var client = DefaultClient.Create(); await client.UpdateSecurityCrumbAsync(); await SetupDeleteJob(client); await client.Jobs.DeleteAsync("Delete Job"); }
public void ListAllJobs() { var client = DefaultClient.Create(); var jenkins = client.Get(); foreach (var job in jenkins.Jobs) { output.WriteLine($"{job.Name} [{job.Class}]"); var jobBase = client.Jobs.Get <JenkinsJobBase>(job.Name); output.WriteLine($" {jobBase.FullDisplayName}"); output.WriteLine($" {jobBase.Url}"); } }
public async Task ListAllJobsAsync() { var client = DefaultClient.Create(); var jenkins = await client.GetAsync(); foreach (var job in jenkins.Jobs) { TestContext.Out.WriteLine($"{job.Name} [{job.Class}]"); var jobBase = await client.Jobs.GetAsync <JenkinsJobBase>(job.Name); TestContext.Out.WriteLine($" {jobBase.FullDisplayName}"); TestContext.Out.WriteLine($" {jobBase.Url}"); } }