Esempio n. 1
0
        public async Task <bool> Run()
        {
            var app = await _userPollService.AskApplication();

            var env = await _userPollService.AskEnvironment(app);

            var cfgProfile = await _userPollService.AskConfigurationProfile(app);

            Console.Write("Client id: ");
            var clientId = Console.ReadLine();

            var version = _userPollService.AskVersion();

            var config = await _client.GetConfigurationAsync(new GetConfigurationRequest
            {
                Application   = app.Id,
                Environment   = env.Id,
                Configuration = cfgProfile.Id,
                ClientId      = clientId,
                ClientConfigurationVersion = version
            });

            Console.WriteLine($"Config version: {config.ConfigurationVersion}");
            Console.WriteLine($"Config content type: {config.ContentType}");

            var strContent = Encoding.ASCII.GetString(config.Content.ToArray());

            Console.WriteLine("Config content:");
            Console.WriteLine(strContent);


            return(false);
        }
Esempio n. 2
0
        public async Task <bool> Run()
        {
            var app = await _userPollService.AskApplication();

            var env = await _userPollService.AskEnvironment(app);

            var cfgProfile = await _userPollService.AskConfigurationProfile(app);

            var strategy = await _userPollService.AskDeploymentStrategy();

            var version = await _userPollService.AskVersion(app.Id, cfgProfile.Id);

            var startDeploymentResult = await
                                        _deploymentService.StartDeployment(app.Id, env.Id, strategy.Id, cfgProfile.Id, version);

            await _deploymentService.WaitDeployment(startDeploymentResult);

            Console.WriteLine("Deployment finished");
            return(false);
        }