mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
parent
64a77decfd
commit
67e85cabcb
@ -67,15 +67,11 @@ export const cloneBitbucketRepository = async (
|
|||||||
if (recurseSubmodules) {
|
if (recurseSubmodules) {
|
||||||
cloneArgs.splice(4, 0, "--recurse-submodules");
|
cloneArgs.splice(4, 0, "--recurse-submodules");
|
||||||
}
|
}
|
||||||
await spawnAsync(
|
await spawnAsync("git", cloneArgs, (data) => {
|
||||||
"git",
|
if (writeStream.writable) {
|
||||||
cloneArgs,
|
writeStream.write(data);
|
||||||
(data) => {
|
}
|
||||||
if (writeStream.writable) {
|
});
|
||||||
writeStream.write(data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
|
||||||
writeStream.write(`\nCloned ${repoclone} to ${outputPath}: ✅\n`);
|
writeStream.write(`\nCloned ${repoclone} to ${outputPath}: ✅\n`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
writeStream.write(`ERROR Clonning: ${error}: ❌`);
|
writeStream.write(`ERROR Clonning: ${error}: ❌`);
|
||||||
|
@ -23,7 +23,13 @@ export const cloneGitRepository = async (
|
|||||||
isCompose = false,
|
isCompose = false,
|
||||||
) => {
|
) => {
|
||||||
const { SSH_PATH, COMPOSE_PATH, APPLICATIONS_PATH } = paths();
|
const { SSH_PATH, COMPOSE_PATH, APPLICATIONS_PATH } = paths();
|
||||||
const { appName, customGitUrl, customGitBranch, customGitSSHKeyId, recurseSubmodules = true } = entity;
|
const {
|
||||||
|
appName,
|
||||||
|
customGitUrl,
|
||||||
|
customGitBranch,
|
||||||
|
customGitSSHKeyId,
|
||||||
|
recurseSubmodules = true,
|
||||||
|
} = entity;
|
||||||
|
|
||||||
if (!customGitUrl || !customGitBranch) {
|
if (!customGitUrl || !customGitBranch) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
@ -269,7 +275,13 @@ export const cloneGitRawRepository = async (entity: {
|
|||||||
customGitSSHKeyId?: string | null;
|
customGitSSHKeyId?: string | null;
|
||||||
recurseSubmodules?: boolean;
|
recurseSubmodules?: boolean;
|
||||||
}) => {
|
}) => {
|
||||||
const { appName, customGitUrl, customGitBranch, customGitSSHKeyId, recurseSubmodules = true } = entity;
|
const {
|
||||||
|
appName,
|
||||||
|
customGitUrl,
|
||||||
|
customGitBranch,
|
||||||
|
customGitSSHKeyId,
|
||||||
|
recurseSubmodules = true,
|
||||||
|
} = entity;
|
||||||
|
|
||||||
if (!customGitUrl || !customGitBranch) {
|
if (!customGitUrl || !customGitBranch) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
@ -327,19 +339,14 @@ export const cloneGitRawRepository = async (entity: {
|
|||||||
if (recurseSubmodules) {
|
if (recurseSubmodules) {
|
||||||
cloneArgs.splice(4, 0, "--recurse-submodules");
|
cloneArgs.splice(4, 0, "--recurse-submodules");
|
||||||
}
|
}
|
||||||
await spawnAsync(
|
await spawnAsync("git", cloneArgs, (_data) => {}, {
|
||||||
"git",
|
env: {
|
||||||
cloneArgs,
|
...process.env,
|
||||||
(_data) => {},
|
...(customGitSSHKeyId && {
|
||||||
{
|
GIT_SSH_COMMAND: `ssh -i ${temporalKeyPath}${port ? ` -p ${port}` : ""} -o UserKnownHostsFile=${knownHostsPath}`,
|
||||||
env: {
|
}),
|
||||||
...process.env,
|
|
||||||
...(customGitSSHKeyId && {
|
|
||||||
GIT_SSH_COMMAND: `ssh -i ${temporalKeyPath}${port ? ` -p ${port}` : ""} -o UserKnownHostsFile=${knownHostsPath}`,
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
@ -143,15 +143,11 @@ export const cloneGithubRepository = async ({
|
|||||||
if (recurseSubmodules) {
|
if (recurseSubmodules) {
|
||||||
cloneArgs.splice(4, 0, "--recurse-submodules");
|
cloneArgs.splice(4, 0, "--recurse-submodules");
|
||||||
}
|
}
|
||||||
await spawnAsync(
|
await spawnAsync("git", cloneArgs, (data) => {
|
||||||
"git",
|
if (writeStream.writable) {
|
||||||
cloneArgs,
|
writeStream.write(data);
|
||||||
(data) => {
|
}
|
||||||
if (writeStream.writable) {
|
});
|
||||||
writeStream.write(data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
|
||||||
writeStream.write(`\nCloned ${repoclone}: ✅\n`);
|
writeStream.write(`\nCloned ${repoclone}: ✅\n`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
writeStream.write(`ERROR Clonning: ${error}: ❌`);
|
writeStream.write(`ERROR Clonning: ${error}: ❌`);
|
||||||
@ -233,7 +229,14 @@ echo "Cloned ${repoclone} to ${outputPath}: ✅" >> ${logPath};
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const cloneRawGithubRepository = async (entity: Compose) => {
|
export const cloneRawGithubRepository = async (entity: Compose) => {
|
||||||
const { appName, repository, owner, branch, githubId, recurseSubmodules = true } = entity;
|
const {
|
||||||
|
appName,
|
||||||
|
repository,
|
||||||
|
owner,
|
||||||
|
branch,
|
||||||
|
githubId,
|
||||||
|
recurseSubmodules = true,
|
||||||
|
} = entity;
|
||||||
|
|
||||||
if (!githubId) {
|
if (!githubId) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
@ -271,7 +274,15 @@ export const cloneRawGithubRepository = async (entity: Compose) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const cloneRawGithubRepositoryRemote = async (compose: Compose) => {
|
export const cloneRawGithubRepositoryRemote = async (compose: Compose) => {
|
||||||
const { appName, repository, owner, branch, githubId, serverId, recurseSubmodules = true } = compose;
|
const {
|
||||||
|
appName,
|
||||||
|
repository,
|
||||||
|
owner,
|
||||||
|
branch,
|
||||||
|
githubId,
|
||||||
|
serverId,
|
||||||
|
recurseSubmodules = true,
|
||||||
|
} = compose;
|
||||||
|
|
||||||
if (!serverId) {
|
if (!serverId) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
|
@ -90,8 +90,14 @@ export const cloneGitlabRepository = async (
|
|||||||
isCompose = false,
|
isCompose = false,
|
||||||
) => {
|
) => {
|
||||||
const writeStream = createWriteStream(logPath, { flags: "a" });
|
const writeStream = createWriteStream(logPath, { flags: "a" });
|
||||||
const { appName, gitlabBranch, gitlabId, gitlab, gitlabPathNamespace, recurseSubmodules = true } =
|
const {
|
||||||
entity;
|
appName,
|
||||||
|
gitlabBranch,
|
||||||
|
gitlabId,
|
||||||
|
gitlab,
|
||||||
|
gitlabPathNamespace,
|
||||||
|
recurseSubmodules = true,
|
||||||
|
} = entity;
|
||||||
|
|
||||||
if (!gitlabId) {
|
if (!gitlabId) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
@ -140,15 +146,11 @@ export const cloneGitlabRepository = async (
|
|||||||
if (recurseSubmodules) {
|
if (recurseSubmodules) {
|
||||||
cloneArgs.splice(4, 0, "--recurse-submodules");
|
cloneArgs.splice(4, 0, "--recurse-submodules");
|
||||||
}
|
}
|
||||||
await spawnAsync(
|
await spawnAsync("git", cloneArgs, (data) => {
|
||||||
"git",
|
if (writeStream.writable) {
|
||||||
cloneArgs,
|
writeStream.write(data);
|
||||||
(data) => {
|
}
|
||||||
if (writeStream.writable) {
|
});
|
||||||
writeStream.write(data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
);
|
|
||||||
writeStream.write(`\nCloned ${repoclone}: ✅\n`);
|
writeStream.write(`\nCloned ${repoclone}: ✅\n`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
writeStream.write(`ERROR Clonning: ${error}: ❌`);
|
writeStream.write(`ERROR Clonning: ${error}: ❌`);
|
||||||
@ -330,7 +332,13 @@ export const getGitlabBranches = async (input: {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const cloneRawGitlabRepository = async (entity: Compose) => {
|
export const cloneRawGitlabRepository = async (entity: Compose) => {
|
||||||
const { appName, gitlabBranch, gitlabId, gitlabPathNamespace, recurseSubmodules = true } = entity;
|
const {
|
||||||
|
appName,
|
||||||
|
gitlabBranch,
|
||||||
|
gitlabId,
|
||||||
|
gitlabPathNamespace,
|
||||||
|
recurseSubmodules = true,
|
||||||
|
} = entity;
|
||||||
|
|
||||||
if (!gitlabId) {
|
if (!gitlabId) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
@ -371,7 +379,14 @@ export const cloneRawGitlabRepository = async (entity: Compose) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const cloneRawGitlabRepositoryRemote = async (compose: Compose) => {
|
export const cloneRawGitlabRepositoryRemote = async (compose: Compose) => {
|
||||||
const { appName, gitlabPathNamespace, branch, gitlabId, serverId, recurseSubmodules = true } = compose;
|
const {
|
||||||
|
appName,
|
||||||
|
gitlabPathNamespace,
|
||||||
|
branch,
|
||||||
|
gitlabId,
|
||||||
|
serverId,
|
||||||
|
recurseSubmodules = true,
|
||||||
|
} = compose;
|
||||||
|
|
||||||
if (!serverId) {
|
if (!serverId) {
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
|
Loading…
Reference in New Issue
Block a user