public LogCodebuildEvent(LogToElasticsearch logToEs, IAmazonCodeBuild cb) : base(request => (from codebuildEvent in Observable.Return(request) let projectName = codebuildEvent.SelectToken("detail.project-name")?.ToObject <string>() where !string.IsNullOrEmpty(projectName) let batchGetProjectsRequest = new BatchGetProjectsRequest { Names = new List <string> { projectName } } from batchGetProjectsResponse in cb.BatchGetProjectsAsync(batchGetProjectsRequest) let time = codebuildEvent["time"].Value <DateTime>() from project in batchGetProjectsResponse.Projects let tags = project.Tags let app = tags.GetValue("repo") ?? tags.GetValue("Application") ?? tags.GetValue("app") let env = tags.GetValue("env") ?? tags.GetValue("Environment") let sha = tags.GetValue("sha") let log = new AlteredLog { Time = time, Repo = app, Env = env, Sha = sha, Log = codebuildEvent } from response in logToEs.Execute(log) select response).ToTask()) { }
private Amazon.CodeBuild.Model.CreateWebhookResponse CallAWSServiceOperation(IAmazonCodeBuild client, Amazon.CodeBuild.Model.CreateWebhookRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS CodeBuild", "CreateWebhook"); try { #if DESKTOP return(client.CreateWebhook(request)); #elif CORECLR return(client.CreateWebhookAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }
internal ListReportsForReportGroupPaginator(IAmazonCodeBuild client, ListReportsForReportGroupRequest request) { this._client = client; this._request = request; }
internal ListBuildsPaginator(IAmazonCodeBuild client, ListBuildsRequest request) { this._client = client; this._request = request; }
internal CodeBuildPaginatorFactory(IAmazonCodeBuild client) { this.client = client; }
internal DescribeCodeCoveragesPaginator(IAmazonCodeBuild client, DescribeCodeCoveragesRequest request) { this._client = client; this._request = request; }
internal ListSharedProjectsPaginator(IAmazonCodeBuild client, ListSharedProjectsRequest request) { this._client = client; this._request = request; }
internal ListSharedReportGroupsPaginator(IAmazonCodeBuild client, ListSharedReportGroupsRequest request) { this._client = client; this._request = request; }
internal ListBuildBatchesForProjectPaginator(IAmazonCodeBuild client, ListBuildBatchesForProjectRequest request) { this._client = client; this._request = request; }
protected override void ProcessRecord() { base.ProcessRecord(); Client = CreateClient(_CurrentCredentials, _RegionEndpoint); }