Exemple #1
0
        /// <inheritdoc />
        public async Task UpdateApplicationInformationAsync(
            string org,
            string app,
            string commitId,
            EnvironmentModel deploymentEnvironment)
        {
            GitTreeStructure gitTree = await _giteaApiWrapper.GetGitTreeAsync(org, app, commitId);

            string fullCommitSha = gitTree.Sha;

            Task updateMetadataTask = _applicationMetadataService
                                      .UpdateApplicationMetadataAsync(org, app, fullCommitSha, deploymentEnvironment);

            Task updateAuthPolicyTask = _authorizationPolicyService
                                        .UpdateApplicationAuthorizationPolicyAsync(org, app, fullCommitSha, deploymentEnvironment);

            await Task.WhenAll(new List <Task>
            {
                updateMetadataTask,
                updateAuthPolicyTask
            });
        }