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

@@ -37,6 +37,13 @@ export default async function ({
buildId,
applicationId
});
if (gitCommitHash) {
await saveBuildLog({
line: `Checking out ${gitCommitHash} commit.`,
buildId,
applicationId
});
}
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 .. `
);
@@ -68,6 +75,13 @@ export default async function ({
buildId,
applicationId
});
if (gitCommitHash) {
await saveBuildLog({
line: `Checking out ${gitCommitHash} commit.`,
buildId,
applicationId
});
}
await asyncExecShell(
`git clone -q -b ${branch} https://x-access-token:${token}@${url}/${repository}.git --config core.sshCommand="ssh -p ${customPort}" ${workdir}/ && cd ${workdir} && git checkout ${gitCommitHash || ""} && git submodule update --init --recursive && git lfs pull && cd .. `
);