fix: complete server pull deployment setup
ForgeFlow quality gate / quality (push) Canceled after 0s

This commit is contained in:
NuklearRabbit
2026-08-09 00:43:08 +02:00
parent 4c21616e72
commit bffad670ef
12 changed files with 110 additions and 25 deletions
+22 -3
View File
@@ -255,19 +255,38 @@ function createUnraidInventoryMethods({
}
refreshedProfileFromWorkload(repository, server, workload, existingProfile) {
const configuredRoot = path.join(server.basePath, existingProfile.remoteFolder || "").replace(/\/+$/, "");
const composeWorkingDir = String(workload.compose?.workingDir || "").replace(/\/+$/, "");
const configuredRootOwnsCompose = Boolean(
configuredRoot
&& composeWorkingDir
&& (composeWorkingDir === configuredRoot || composeWorkingDir.startsWith(`${configuredRoot}/`)),
);
const detected = this.profileFromWorkload(repository, server, workload, {
linkSource: existingProfile.workloadIdentity?.linkSource || "automatic-compose",
deploymentMode: ["push-bundle", "server-git", "monitor-only"].includes(existingProfile.deploymentMode)
? existingProfile.deploymentMode
: "push-bundle",
remoteFolder: workload.remoteFolderCandidate || existingProfile.remoteFolder,
remoteFolder: configuredRootOwnsCompose
? existingProfile.remoteFolder
: workload.remoteFolderCandidate || existingProfile.remoteFolder,
});
const repositoryRelativeComposeFiles = configuredRootOwnsCompose
? [...new Set((workload.compose?.configFiles || []).map((file) => {
const value = String(file || "").trim().replace(/\\/g, "/");
if (value.startsWith(`${configuredRoot}/`)) return value.slice(configuredRoot.length + 1);
return value.startsWith("/") ? "" : value;
}).filter(Boolean))]
: [];
const composeFiles = repositoryRelativeComposeFiles.length
? repositoryRelativeComposeFiles
: detected.composeFiles;
return {
...existingProfile,
deploymentMode: detected.deploymentMode,
remoteFolder: detected.remoteFolder,
composeFile: detected.composeFile,
composeFiles: detected.composeFiles,
composeFile: composeFiles[0],
composeFiles,
composeProject: detected.composeProject,
composeWorkingDir: detected.composeWorkingDir,
composeService: detected.composeService,