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

Merge branch 'Issue/2967-fixGD' into 'dev'

Fix: CI/CD with only new Graphs in GD

See merge request !25
parents c1a9c110 1f85e4a2
No related branches found
No related tags found
2 merge requests!30Dev,!25Fix: CI/CD with only new Graphs in GD
......@@ -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)
{
......
Output @ a5abb9b0
Subproject commit a5abb9b05d3ed65cb1bc82e9fac08a9bf3392b11
......@@ -5,7 +5,7 @@
"IsEnabled": true,
"WorkingFolder": "./Output/",
"Logger": {
"LogLevel": "Information",
"LogLevel": "Debug",
"LogHome": "./Logs"
},
"GitLab": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment