public async Task StartDeployment()

in Editor/Deployment/ContainersDeploymentSettings.cs [296:369]


        public async Task StartDeployment()
        {
            ContainersDeployerBase currentDeployer = _deployers[Scenario];
            
            if (IsDeploymentRunning)
            {
                Debug.Log("Deployment running");
                return;
            }

            IsDeploymentRunning = true;
            _delayedStackInfoRefresh.Cancel();
            string parametersPath = _pathConverter.GetParametersFilePath(ScenarioPath);
            IReadOnlyDictionary<string, string> parameters = PrepareParameters();
            var parameterUpdateResponse = _parametersUpdater.Update(parametersPath, parameters);
            
            if (!parameterUpdateResponse.Success)
            {
                _status.IsDisplayed = true;
                _status.SetMessage(parameterUpdateResponse.ErrorMessage, MessageType.Error);
                _logger.LogResponseError(parameterUpdateResponse);
                return;
            }

            CurrentStackInfo = new DeploymentStackInfo(_textProvider.Get(Strings.StatusDeploymentStarting));

            string stackName = _coreApi.GetStackNameContainers(GameName);
            var deploymentId = new DeploymentId(CurrentProfile, CurrentRegion, stackName, currentDeployer.DisplayName);
            _currentDeploymentId.Set(deploymentId);
            
            try
            {
                DeploymentResponse response = await currentDeployer.StartDeployment(ScenarioPath,
                    GameName, isDevelopmentBuild: EditorUserBuildSettings.development);

                if (!response.Success)
                {
                    if (response.ErrorCode != ErrorCode.OperationCancelled)
                    {
                        _logger.LogResponseError(response);
                        string messageTemplate = _textProvider.Get(Strings.StatusDeploymentFailure);
                        string message = string.Format(messageTemplate, _textProvider.GetError(response.ErrorCode));
                        _status.SetMessage(message, MessageType.Error);
                        _status.IsDisplayed = true;
                    }
                    return;
                }

                _deploymentWaiter.InfoUpdated += OnDeploymentWaiterInfoUpdated;
                response = await _deploymentWaiter.WaitUntilDone(deploymentId);
                LogWaitResponse(response);

                if (response.ErrorCode != ErrorCode.OperationCancelled)
                {
                    _currentDeploymentId.Clear();
                }
            }
            catch (Exception ex)
            {
                _currentDeploymentId.Clear();
                _logger.LogException(ex);
                string messageTemplate = _textProvider.Get(Strings.StatusDeploymentFailure);
                string message = string.Format(messageTemplate, ex.Message);
                _status.SetMessage(message, MessageType.Error);
                _status.IsDisplayed = true;
                throw;
            }
            finally
            {
                IsDeploymentRunning = false;
                _deploymentWaiter.InfoUpdated -= OnDeploymentWaiterInfoUpdated;
                RefreshCurrentStackInfo();
            }
        }