Refactor deployment handling and improve error logging for Git operations

This commit is contained in:
DerDavidBohl
2025-11-14 17:26:57 +01:00
parent 246fcdb0a2
commit 08c7f76a6d
3 changed files with 3 additions and 2 deletions

View File

@@ -30,6 +30,7 @@ public class DirigentApplication {
Runtime.getRuntime().exec((composeCommand + " --version").split(" "));
return true;
} catch (Exception e) {
logger.error("Compose is not installed. Please install it and try again.", e);
// Handle exception if needed
}
return false;

View File

@@ -116,7 +116,7 @@ public class DeploymentsService {
)
.collect(Collectors.toList());
deployListOfDeployments(deployments, true);
deployListOfDeployments(deployments, false);
}
@EventListener(NamedDeploymentStopRequestedEvent.class)

View File

@@ -23,7 +23,7 @@ public class GitService {
public boolean updateRepo(String repoUrl, String targetDir, String rev) throws IOException, InterruptedException {
logger.info("Cloning or pulling git repository '{}' to dir '{}'", repoUrl, targetDir);
logger.info("Cloning or pulling git repository '{}' to dir '{}' @ rev '{}'", repoUrl, targetDir, rev);
File destinationDir = new File(targetDir);