Skip to content
Snippets Groups Projects
Commit 95a9bbce authored by Petar Hristov's avatar Petar Hristov :speech_balloon:
Browse files

Try coloring

parent 886518d0
No related branches found
No related tags found
1 merge request!33New: Color console output
......@@ -19,6 +19,14 @@ public class Deployer
private readonly GraphDeployerConfiguration _graphDeployerConfiguration;
private readonly AdminApi _adminApi;
// Define ANSI escape codes for colors
private const string Esc = "\u001b"; // ANSI escape character
private const string Green = $"{Esc}[92m";
private const string Red = $"{Esc}[91m";
private const string Blue = $"{Esc}[94m";
private const string Reset = $"{Esc}[0m";
public Deployer(ILogger<Deployer> logger, IOptionsMonitor<GraphDeployerConfiguration> graphDeployerConfiguration)
{
_logger = logger;
......@@ -79,7 +87,7 @@ public class Deployer
// Iterate over the repositories and deploy the graphs
foreach (var graphRepo in _graphDeployerConfiguration.GitLab.Repositories)
{
_logger.LogInformation("Working with {repoName}", graphRepo.Name);
_logger.LogInformation("Working with {Green}{repoName}{Reset}", Green, graphRepo.Name, Reset);
// Clone the repository inside the Working Folder
var success = CloneRepo(graphRepo.Url, WorkingFolder, _graphDeployerConfiguration.GitLab.Token, graphRepo.Ref);
......
......@@ -73,30 +73,30 @@ public class Program
var configuration = configBuilder
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{_environmentName}.json", optional: true, reloadOnChange: true)
.AddConsul(
"coscine/Coscine.Infrastructure/GraphDeployer/appsettings",
options =>
{
options.ConsulConfigurationOptions =
cco => cco.Address = new Uri(consulUrl);
options.Optional = true;
options.ReloadOnChange = true;
options.PollWaitTime = TimeSpan.FromSeconds(5);
options.OnLoadException = exceptionContext => exceptionContext.Ignore = true;
}
)
.AddConsul(
$"coscine/Coscine.Infrastructure/GraphDeployer/appsettings.{_environmentName}.json",
options =>
{
options.ConsulConfigurationOptions =
cco => cco.Address = new Uri(consulUrl);
options.Optional = true;
options.ReloadOnChange = true;
options.PollWaitTime = TimeSpan.FromSeconds(5);
options.OnLoadException = exceptionContext => exceptionContext.Ignore = true;
}
)
//.AddConsul(
// "coscine/Coscine.Infrastructure/GraphDeployer/appsettings",
// options =>
// {
// options.ConsulConfigurationOptions =
// cco => cco.Address = new Uri(consulUrl);
// options.Optional = true;
// options.ReloadOnChange = true;
// options.PollWaitTime = TimeSpan.FromSeconds(5);
// options.OnLoadException = exceptionContext => exceptionContext.Ignore = true;
// }
//)
//.AddConsul(
// $"coscine/Coscine.Infrastructure/GraphDeployer/appsettings.{_environmentName}.json",
// options =>
// {
// options.ConsulConfigurationOptions =
// cco => cco.Address = new Uri(consulUrl);
// options.Optional = true;
// options.ReloadOnChange = true;
// options.PollWaitTime = TimeSpan.FromSeconds(5);
// options.OnLoadException = exceptionContext => exceptionContext.Ignore = true;
// }
//)
.AddEnvironmentVariables()
.Build();
......
......@@ -14,83 +14,8 @@
"Repositories": [
{
"Name": "Application Profiles",
"Url": "https://git.rwth-aachen.de/coscine/graphs/applicationprofiles.git"
},
{
"Name": "Organisations",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organizations.git"
},
{
"Name": "FH Bielefeld",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/00edvg943.git"
},
{
"Name": "HS Düsseldorf",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/00ftx0026.git"
},
{
"Name": "FH Münster",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/00pv45a02.git"
},
{
"Name": "TH Köln",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/014nnvj65.git"
},
{
"Name": "TU Dortmund",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/01k97gp34.git"
},
{
"Name": "HS Ruhr West",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/02nkxrq89.git"
},
{
"Name": "FH Dortmund",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/03dv91853.git"
},
{
"Name": "HS für Gesundheit Bochum",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/03hj8rz96.git"
},
{
"Name": "TH Ostwestfalen-Lippe",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/04eka8j06.git"
},
{
"Name": "HS Bonn-Rhein-Sieg",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/04m2anh63.git"
},
{
"Name": "University of Duisburg-Essen",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/04mz5ra38.git"
},
{
"Name": "Westfälische Hochschule",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/04p7ekn23.git"
},
{
"Name": "FH Aachen",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/04tqgg260.git"
},
{
"Name": "Ruhr-Universität Bochum",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/04tsk2644.git"
},
{
"Name": "Hochschule Rhein-Waal",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/04wdt0z89.git"
},
{
"Name": "HS Bochum",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/04x02q560.git"
},
{
"Name": "RWTH Aachen University",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/04xfq0f34.git"
},
{
"Name": "TU Darmstadt",
"Url": "https://git.rwth-aachen.de/coscine/graphs/organisations/05n911h24.git"
"Url": "https://git.rwth-aachen.de/coscine/graphs/applicationprofiles.git",
"Ref": "IoP_v1"
}
]
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment