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
168cb56a
Commit
168cb56a
authored
10 months ago
by
Petar Hristov
Browse files
Options
Downloads
Patches
Plain Diff
Fix: File hashing and formatting
parent
6ea75661
No related branches found
No related tags found
No related merge requests found
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/GraphDeployer/Deployer.cs
+6
-4
6 additions, 4 deletions
src/GraphDeployer/Deployer.cs
with
6 additions
and
4 deletions
src/GraphDeployer/Deployer.cs
+
6
−
4
View file @
168cb56a
...
...
@@ -64,6 +64,7 @@ public class Deployer
{
_logger
.
LogInformation
(
"Running in Dummy Mode. No changes will be made."
);
}
_logger
.
LogDebug
(
"Redeploy: {redeploy}"
,
opts
.
Redeploy
);
// Override the working folder if specified in the configuration
if
(!
string
.
IsNullOrWhiteSpace
(
_graphDeployerConfiguration
.
WorkingFolder
))
...
...
@@ -123,6 +124,8 @@ public class Deployer
var
graphId
=
kv
.
Key
.
ToString
();
var
currentRun
=
new
Dictionary
<
string
,
string
>();
_logger
.
LogDebug
(
"Deploying graph: {graphName}"
,
graphId
);
// 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
)));
...
...
@@ -131,7 +134,7 @@ public class Deployer
if
(
hasChanged
)
{
_logger
.
LogDebug
(
"The graph has
e
changed"
);
_logger
.
LogDebug
(
"The graph has changed"
);
}
else
{
_logger
.
LogDebug
(
"The graph has not changed"
);
...
...
@@ -139,13 +142,12 @@ public class Deployer
if
(
deployedGraph
is
null
)
{
_logger
.
LogDebug
(
"
d
eployed
G
raph is null"
);
_logger
.
LogDebug
(
"
D
eployed
g
raph 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.
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