Esempio n. 1
0
        /// <inheritdoc />
        public async Task UpdateDeploymentStatus(string buildNumber)
        {
            Build build = await _azureDevOpsBuildClient.Get(buildNumber);

            await _deploymentService.UpdateAsync(new DeploymentEntity
            {
                Build = ToBuildEntity(build)
            });
        }
Esempio n. 2
0
        public async Task <IActionResult> CheckDeploymentStatus(
            AzureDevOpsWebHookEventModel model,
            [FromServices] IDeploymentService deploymentService)
        {
            string buildId = model.Resource.BuildNumber;
            Build  build   = await _buildClient.Get(buildId);

            await deploymentService.UpdateAsync(new DeploymentEntity
            {
                Build = new BuildEntity
                {
                    Id       = build.Id.ToString(),
                    Result   = build.Result,
                    Status   = build.Status,
                    Started  = build.StartTime,
                    Finished = build.FinishTime
                }
            });

            return(Ok());
        }