Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GraphDeployer
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Coscine
backend
scripts
GraphDeployer
Commits
95a9bbce
Commit
95a9bbce
authored
11 months ago
by
Petar Hristov
Browse files
Options
Downloads
Patches
Plain Diff
Try coloring
parent
886518d0
No related branches found
No related tags found
1 merge request
!33
New: Color console output
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/GraphDeployer/Deployer.cs
+9
-1
9 additions, 1 deletion
src/GraphDeployer/Deployer.cs
src/GraphDeployer/Program.cs
+24
-24
24 additions, 24 deletions
src/GraphDeployer/Program.cs
src/GraphDeployer/appsettings.json
+2
-77
2 additions, 77 deletions
src/GraphDeployer/appsettings.json
with
35 additions
and
102 deletions
src/GraphDeployer/Deployer.cs
+
9
−
1
View file @
95a9bbce
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
src/GraphDeployer/Program.cs
+
24
−
24
View file @
95a9bbce
...
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
src/GraphDeployer/appsettings.json
+
2
−
77
View file @
95a9bbce
...
...
@@ -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"
}
]
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment