Skip to content

Commit d938c6f

Browse files
committed
Fix missing lockerfil in initContainers
1 parent 41acd2c commit d938c6f

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

.diploi/helm/app.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,17 @@ spec:
4242
- /bin/sh
4343
- -c
4444
- |
45-
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
46-
elif [ -f package-lock.json ]; then npm ci || npm i; \
47-
elif [ -f pnpm-lock.yaml ]; then pnpm i --frozen-lockfile || pnpm i; \
48-
else echo "Lockfile not found. Skipping install."; \
45+
if [ -f yarn.lock ]; then
46+
yarn install --frozen-lockfile || yarn install
47+
elif [ -f package-lock.json ]; then
48+
npm ci || npm install
49+
elif [ -f pnpm-lock.yaml ]; then
50+
pnpm install --frozen-lockfile || pnpm install
51+
elif [ -f package.json ]; then
52+
echo "Lockfile not found. Falling back to npm install (non-deterministic install)."
53+
npm install
54+
else
55+
echo "No package manifest found. Skipping install."
4956
fi
5057
workingDir: /app{{ .Values.folder }}
5158
env:
@@ -77,7 +84,7 @@ spec:
7784
- -c
7885
- |
7986
if [ -f yarn.lock ]; then
80-
yarn --frozen-lockfile || yarn install
87+
yarn install --frozen-lockfile || yarn install
8188
elif [ -f package-lock.json ]; then
8289
npm ci || npm install
8390
elif [ -f pnpm-lock.yaml ]; then

0 commit comments

Comments
 (0)