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
aaa9f8f9
Commit
aaa9f8f9
authored
10 months ago
by
Petar Hristov
Browse files
Options
Downloads
Plain Diff
Merge branch 'Issue/2967-fixGD' into 'dev'
Fix: CI/CD with only new Graphs in GD See merge request
!25
parents
c1a9c110
1f85e4a2
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!30
Dev
,
!25
Fix: CI/CD with only new Graphs in GD
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/GraphDeployer/Deployer.cs
+19
-0
19 additions, 0 deletions
src/GraphDeployer/Deployer.cs
src/GraphDeployer/Output
+1
-0
1 addition, 0 deletions
src/GraphDeployer/Output
src/GraphDeployer/appsettings.json
+1
-1
1 addition, 1 deletion
src/GraphDeployer/appsettings.json
with
21 additions
and
1 deletion
src/GraphDeployer/Deployer.cs
+
19
−
0
View file @
aaa9f8f9
...
...
@@ -125,9 +125,28 @@ public class Deployer
// Get the hash of the currently deployed graph and compare it with the hash of the graph to be deployed
files
.
ForEach
((
path
)
=>
currentRun
.
TryAdd
(
graphId
,
HashUtil
.
GetFileHash
(
path
)));
var
deployedGraph
=
deployedGraphsList
.
FirstOrDefault
((
g
)
=>
g
.
Uri
==
graphId
);
var
hasChanged
=
deployedGraph
is
null
||
!
deployedGraph
.
FileHashes
.
Contains
(
currentRun
[
graphId
])
||
opts
.
Redeploy
;
if
(
hasChanged
)
{
_logger
.
LogDebug
(
"The graph hase changed"
);
}
else
{
_logger
.
LogDebug
(
"The graph has not changed"
);
}
if
(
deployedGraph
is
null
)
{
_logger
.
LogDebug
(
"deployedGraph is null"
);
}
else
{
_logger
.
LogDebug
(
"Deployed hash: {hash}"
,
string
.
Join
(
','
,
deployedGraph
.
FileHashes
));
}
_logger
.
LogDebug
(
"Incoming hash: {hash}"
,
currentRun
[
graphId
]);
_logger
.
LogDebug
(
"Redeploy: {redeploy}"
,
opts
.
Redeploy
);
// Deploy the graph if it has changed or if the redeploy flag is set
if
(
hasChanged
)
{
...
...
This diff is collapsed.
Click to expand it.
Output
@
a5abb9b0
Subproject commit a5abb9b05d3ed65cb1bc82e9fac08a9bf3392b11
This diff is collapsed.
Click to expand it.
src/GraphDeployer/appsettings.json
+
1
−
1
View file @
aaa9f8f9
...
...
@@ -5,7 +5,7 @@
"IsEnabled"
:
true
,
"WorkingFolder"
:
"./Output/"
,
"Logger"
:
{
"LogLevel"
:
"
Information
"
,
"LogLevel"
:
"
Debug
"
,
"LogHome"
:
"./Logs"
},
"GitLab"
:
{
...
...
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