fix: cleanup build cache as well
This commit is contained in:
parent
6baec7277f
commit
e9723d3f22
@ -1977,6 +1977,12 @@ export async function cleanupDockerStorage(dockerId, lowDiskSpace, force) {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
//console.log(error);
|
//console.log(error);
|
||||||
}
|
}
|
||||||
|
// Cleanup build caches
|
||||||
|
try {
|
||||||
|
await executeDockerCmd({ dockerId, command: `docker builder prune -a -f` })
|
||||||
|
} catch (error) {
|
||||||
|
//console.log(error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2022,3 +2028,27 @@ export function defaultComposeConfiguration(network: string): any {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
export function decryptApplication(application: any) {
|
||||||
|
if (application) {
|
||||||
|
if (application?.gitSource?.githubApp?.clientSecret) {
|
||||||
|
application.gitSource.githubApp.clientSecret = decrypt(application.gitSource.githubApp.clientSecret) || null;
|
||||||
|
}
|
||||||
|
if (application?.gitSource?.githubApp?.webhookSecret) {
|
||||||
|
application.gitSource.githubApp.webhookSecret = decrypt(application.gitSource.githubApp.webhookSecret) || null;
|
||||||
|
}
|
||||||
|
if (application?.gitSource?.githubApp?.privateKey) {
|
||||||
|
application.gitSource.githubApp.privateKey = decrypt(application.gitSource.githubApp.privateKey) || null;
|
||||||
|
}
|
||||||
|
if (application?.gitSource?.gitlabApp?.appSecret) {
|
||||||
|
application.gitSource.gitlabApp.appSecret = decrypt(application.gitSource.gitlabApp.appSecret) || null;
|
||||||
|
}
|
||||||
|
if (application?.secrets.length > 0) {
|
||||||
|
application.secrets = application.secrets.map((s: any) => {
|
||||||
|
s.value = decrypt(s.value) || null
|
||||||
|
return s;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return application;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user