feat: deploy specific commit for apps

feat: keep number of images locally to revert quickly
This commit is contained in:
Andras Bacsai
2022-11-29 11:47:20 +01:00
parent ec00548f1b
commit 028ee6d7b1
9 changed files with 117 additions and 23 deletions

View File

@@ -635,7 +635,6 @@ export async function buildImage({
const cache = `${applicationId}:${tag}${isCache ? '-cache' : ''}`
const { dockerRegistry: { url, username, password } } = await prisma.application.findUnique({ where: { id: applicationId }, select: { dockerRegistry: true } })
const location = await saveDockerRegistryCredentials({ url, username, password, workdir })
console.log(`docker ${location ? `--config ${location}` : ''} build --progress plain -f ${workdir}/${dockerFile} -t ${cache} --build-arg SOURCE_COMMIT=${commit} ${workdir}`)
await executeDockerCmd({ debug, buildId, applicationId, dockerId, command: `docker ${location ? `--config ${location}` : ''} build --progress plain -f ${workdir}/${dockerFile} -t ${cache} --build-arg SOURCE_COMMIT=${commit} ${workdir}` })