diff --git a/Dockerfile b/Dockerfile index 778d46764..fea6b8624 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,8 @@ RUN mkdir -p ~/.docker/cli-plugins/ # https://download.docker.com/linux/static/stable/ RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-20.10.9 -o /usr/bin/docker # https://github.com/docker/compose/releases -RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-compose-linux-2.7.0 -o ~/.docker/cli-plugins/docker-compose +# Reverted to 2.6.1 because of this https://github.com/docker/compose/issues/9704. 2.9.0 still has a bug. +RUN curl -SL https://cdn.coollabs.io/bin/$TARGETPLATFORM/docker-compose-linux-2.6.1 -o ~/.docker/cli-plugins/docker-compose RUN chmod +x ~/.docker/cli-plugins/docker-compose /usr/bin/docker RUN (curl -sSL "https://github.com/buildpacks/pack/releases/download/v0.27.0/pack-v0.27.0-linux.tgz" | tar -C /usr/local/bin/ --no-same-owner -xzv pack) diff --git a/apps/api/src/jobs/deployApplication.ts b/apps/api/src/jobs/deployApplication.ts index a8c46d594..e258edfb9 100644 --- a/apps/api/src/jobs/deployApplication.ts +++ b/apps/api/src/jobs/deployApplication.ts @@ -255,11 +255,11 @@ import * as buildpacks from '../lib/buildPacks'; secrets.forEach((secret) => { if (pullmergeRequestId) { if (secret.isPRMRSecret) { - envs.push(`${secret.name}='${secret.value}'`); + envs.push(`${secret.name}=${secret.value}`); } } else { if (!secret.isPRMRSecret) { - envs.push(`${secret.name}='${secret.value}'`); + envs.push(`${secret.name}=${secret.value}`); } } }); diff --git a/apps/api/src/lib/common.ts b/apps/api/src/lib/common.ts index 96921d82a..548492c4d 100644 --- a/apps/api/src/lib/common.ts +++ b/apps/api/src/lib/common.ts @@ -17,7 +17,7 @@ import { checkContainer, removeContainer } from './docker'; import { day } from './dayjs'; import * as serviceFields from './serviceFields' -export const version = '3.5.0'; +export const version = '3.5.1'; export const isDev = process.env.NODE_ENV === 'development'; const algorithm = 'aes-256-ctr'; diff --git a/apps/api/src/routes/api/v1/applications/handlers.ts b/apps/api/src/routes/api/v1/applications/handlers.ts index ce03c6e7c..5f0f2aa2d 100644 --- a/apps/api/src/routes/api/v1/applications/handlers.ts +++ b/apps/api/src/routes/api/v1/applications/handlers.ts @@ -657,13 +657,14 @@ export async function saveSecret(request: FastifyRequest, reply: Fas if (found) { throw { status: 500, message: `Secret ${name} already exists.` } } else { - value = encrypt(value); + value = encrypt(value.trim()); + console.log({value}) await prisma.secret.create({ data: { name, value, isBuildSecret, isPRMRSecret, application: { connect: { id } } } }); } } else { - value = encrypt(value); + value = encrypt(value.trim()); const found = await prisma.secret.findFirst({ where: { applicationId: id, name, isPRMRSecret } }); if (found) { diff --git a/apps/api/src/routes/api/v1/services/handlers.ts b/apps/api/src/routes/api/v1/services/handlers.ts index bfd8a9352..ae147cc4c 100644 --- a/apps/api/src/routes/api/v1/services/handlers.ts +++ b/apps/api/src/routes/api/v1/services/handlers.ts @@ -458,13 +458,13 @@ export async function saveServiceSecret(request: FastifyRequest