feat: specific git commit deployment

feat: revert to specific image
fix: no system wide docker registries
This commit is contained in:
Andras Bacsai
2022-11-30 15:22:07 +01:00
parent a08bb25bfa
commit 9913e7b70b
20 changed files with 494 additions and 231 deletions

View File

@@ -39,7 +39,13 @@ export default async function ({
buildId,
applicationId
});
if (gitCommitHash) {
await saveBuildLog({
line: `Checking out ${gitCommitHash} commit.`,
buildId,
applicationId
});
}
if (forPublic) {
await asyncExecShell(
`git clone -q -b ${branch} https://${url}/${repository}.git ${workdir}/ && cd ${workdir}/ && git checkout ${gitCommitHash || ""} && git submodule update --init --recursive && git lfs pull && cd .. `
@@ -49,7 +55,7 @@ export default async function ({
`git clone -q -b ${branch} git@${url}:${repository}.git --config core.sshCommand="ssh -p ${customPort} -q -i ${repodir}id.rsa -o StrictHostKeyChecking=no" ${workdir}/ && cd ${workdir}/ && git checkout ${gitCommitHash || ""} && git submodule update --init --recursive && git lfs pull && cd .. `
);
}
const { stdout: commit } = await asyncExecShell(`cd ${workdir}/ && git rev-parse HEAD`);
return commit.replace('\n', '');
}