public override async Task <IEnumerable <string> > EnumerateValuesAsync(ValueEnumerationContext context) { var credentials = ResourceCredentials.Create <JenkinsCredentials>(this.CredentialName); var client = new JenkinsClient(credentials); return(await client.GetBuildNumbersAsync(this.JobName).ConfigureAwait(false)); }
public override Task <IEnumerable <string> > EnumerateValuesAsync(ValueEnumerationContext context) { this.SetValues(environmentId: null, applicationId: context.ProjectId); var client = new GitHubClient(this.ApiUrl, this.UserName, this.Password, this.OrganizationName); return(client.ListRefsAsync(this.OrganizationName, this.RepositoryName, RefType.Branch, CancellationToken.None)); }
public override async Task <IEnumerable <string> > EnumerateValuesAsync(ValueEnumerationContext context) { this.SetValues(environmentId: null, applicationId: context.ProjectId); var client = new GitLabClient(this.ApiUrl, this.UserName, this.Password, this.GroupName); return(await client.GetBranchesAsync(this.ProjectName, CancellationToken.None)); }
public override async Task <IEnumerable <string> > EnumerateValuesAsync(ValueEnumerationContext context) { var credentials = ResourceCredentials.Create <TfsCredentials>(this.CredentialName); var api = new TfsRestApi(credentials, null); var projects = await api.GetProjectsAsync().ConfigureAwait(false); return(projects.Select(p => p.name)); }
public override async Task <IEnumerable <string> > EnumerateValuesAsync(ValueEnumerationContext context) { var credentials = ResourceCredentials.Create <TfsCredentials>(this.CredentialName); var api = new TfsRestApi(credentials, null); var definitions = await api.GetBuildDefinitionsAsync(this.TeamProjectName).ConfigureAwait(false); return(definitions.Select(d => d.name)); }
public override async Task <IEnumerable <string> > EnumerateValuesAsync(ValueEnumerationContext context) { var credentials = ResourceCredentials.Create <TeamCityCredentials>(this.CredentialName); using (var client = new TeamCityWebClient(credentials)) { return(await client.GetBuildNumbersAsync(this.ProjectName, this.BuildConfigurationName).ConfigureAwait(false)); } }
public override async Task <IEnumerable <string> > EnumerateValuesAsync(ValueEnumerationContext context) { var client = new UniversalFeedClient(this.GetEndpoint()); return((await client.ListPackagesAsync(this.Group, 100).ConfigureAwait(false)) // additional level of filtering in case of bugs in server .Where(p => string.IsNullOrEmpty(this.Group) || string.Equals(this.Group, p.Group, StringComparison.OrdinalIgnoreCase)) .OrderBy(p => p.Name) .Select(p => p.Name)); }
public override async Task <IEnumerable <string> > EnumerateValuesAsync(ValueEnumerationContext context) { var id = UniversalPackageId.Parse(this.PackageId); var client = new UniversalFeedClient(this.GetEndpoint()); return((await client.ListPackageVersionsAsync(id, false).ConfigureAwait(false)) .Where(p => this.IncludePrerelease || string.IsNullOrEmpty(p.Version.Prerelease)) .OrderByDescending(p => p.Version) .Select(p => p.Version.ToString())); }
public override async Task <IEnumerable <string> > EnumerateValuesAsync(ValueEnumerationContext context) { var credentials = ResourceCredentials.Create <TfsCredentials>(this.CredentialName); var api = new TfsRestApi(credentials, null); var definition = await api.GetBuildDefinitionAsync(this.TeamProjectName, this.BuildDefinitionName).ConfigureAwait(false); if (definition == null) { return(Enumerable.Empty <string>()); } var builds = await api.GetBuildsAsync(this.TeamProjectName, definition.id).ConfigureAwait(false); return(builds.Select(b => b.buildNumber)); }
internal static GitLabCredentials TryCreate(string name, ValueEnumerationContext context) { return((GitLabCredentials)ResourceCredentials.TryCreate(GitLabCredentials.TypeName, name, environmentId: null, applicationId: context.ProjectId, inheritFromParent: false)); }