Example #1
0
        private static void UploadBuildConfigs(TeamCityReader reader)
        {
            var configs = reader.GetBuildConfigs();

            if (configs == null)
            {
                return;
            }

            Console.Write("Uploading {0} build configs...", configs.Count);

            new ElasticLoader(ElasticSearchAddress)
            .UploadList(SharpMapper.ToBuildConfigList(configs, reader), "teamcity_buildconfigs_2", "BuildConfig");

            Console.WriteLine();
        }
        public void ShowBuildConfigs()
        {
            var configs = _reader.GetBuildConfigs();

            foreach (var sharpConfig in configs)
            {
                var sharpBuilds = _reader.GetBuildsByConfigId(sharpConfig.Id);
                var config      = SharpMapper.ToBuildConfig(sharpConfig, sharpBuilds);

                _writer.Write(string.Format(
                                  "Build Config:  Name = {0}\t Project = {1}\n{2}",
                                  config.Name,
                                  config.ProjectName,
                                  JsonConvert.SerializeObject(config)));

                //ShowBuilds(sharpBuilds);
            }
        }