Release 0.3.1 #16
No files matched your search
@@ -29,12 +29,14 @@ GitHub Issues (org: KofTwentyTwo). Commit format: `feat(#N): description` or `Cl
|
||||
|
||||
- Namespace: `kof22`
|
||||
- Orb: `kof22/munitor`
|
||||
- Latest stable: `kof22/munitor@0.3.0`
|
||||
- Latest stable: `kof22/munitor@0.3.1`
|
||||
- Dev snapshot: `kof22/munitor@dev:snapshot`
|
||||
|
||||
`0.3.0` includes first-class pnpm support, repository-owned Dockerfiles for
|
||||
`node-webapp`, and consolidated Kustomize GitOps write-back with optional
|
||||
production-only behavior and bounded push-race retries.
|
||||
production-only behavior and bounded push-race retries. `0.3.1` moves the
|
||||
generated `node-webapp` runtime to `distroless/nodejs<N>-debian13` (debian12
|
||||
failed the Trivy gate on OpenSSL CVEs).
|
||||
|
||||
## Session Continuity
|
||||
|
||||
|
||||
@@ -269,6 +269,9 @@ DOCKERFILE
|
||||
fi
|
||||
else
|
||||
echo "Generating Dockerfile for node-webapp (node ${MUNITOR_NODE_VERSION})"
|
||||
# Single source for the runtime base. debian12 ships libssl3 3.0.18 with
|
||||
# open HIGH/CRITICAL CVEs that fail the Trivy gate; debian13 scans clean.
|
||||
NODE_WEBAPP_RUNTIME_IMAGE="gcr.io/distroless/nodejs${MUNITOR_NODE_VERSION}-debian13"
|
||||
case "${MUNITOR_PACKAGE_MANAGER}" in
|
||||
pnpm)
|
||||
cat > Dockerfile <<DOCKERFILE
|
||||
@@ -282,7 +285,7 @@ ARG GIT_COMMIT_SHA
|
||||
ENV GIT_COMMIT_SHA=\${GIT_COMMIT_SHA}
|
||||
RUN pnpm run build
|
||||
|
||||
FROM gcr.io/distroless/nodejs${MUNITOR_NODE_VERSION}-debian12 AS runner
|
||||
FROM ${NODE_WEBAPP_RUNTIME_IMAGE} AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
@@ -303,7 +306,7 @@ ARG GIT_COMMIT_SHA
|
||||
ENV GIT_COMMIT_SHA=\${GIT_COMMIT_SHA}
|
||||
RUN npm run build
|
||||
|
||||
FROM gcr.io/distroless/nodejs${MUNITOR_NODE_VERSION}-debian12 AS runner
|
||||
FROM ${NODE_WEBAPP_RUNTIME_IMAGE} AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
|
||||
@@ -613,6 +613,9 @@ DOCKERFILE
|
||||
fi
|
||||
else
|
||||
echo "Generating Dockerfile for node-webapp (node ${MUNITOR_NODE_VERSION})"
|
||||
# Single source for the runtime base. debian12 ships libssl3 3.0.18 with
|
||||
# open HIGH/CRITICAL CVEs that fail the Trivy gate; debian13 scans clean.
|
||||
NODE_WEBAPP_RUNTIME_IMAGE="gcr.io/distroless/nodejs${MUNITOR_NODE_VERSION}-debian13"
|
||||
case "${MUNITOR_PACKAGE_MANAGER}" in
|
||||
pnpm)
|
||||
cat > Dockerfile <<DOCKERFILE
|
||||
@@ -626,7 +629,7 @@ ARG GIT_COMMIT_SHA
|
||||
ENV GIT_COMMIT_SHA=\${GIT_COMMIT_SHA}
|
||||
RUN pnpm run build
|
||||
|
||||
FROM gcr.io/distroless/nodejs${MUNITOR_NODE_VERSION}-debian12 AS runner
|
||||
FROM ${NODE_WEBAPP_RUNTIME_IMAGE} AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
@@ -647,7 +650,7 @@ ARG GIT_COMMIT_SHA
|
||||
ENV GIT_COMMIT_SHA=\${GIT_COMMIT_SHA}
|
||||
RUN npm run build
|
||||
|
||||
FROM gcr.io/distroless/nodejs${MUNITOR_NODE_VERSION}-debian12 AS runner
|
||||
FROM ${NODE_WEBAPP_RUNTIME_IMAGE} AS runner
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
|
||||
@@ -472,10 +472,25 @@ image_name: my-webapp
|
||||
node_version: "22"
|
||||
EOF
|
||||
run_generate > /dev/null
|
||||
if grep -q "gcr.io/distroless/nodejs22-debian12" "${WORK_DIR}/Dockerfile"; then
|
||||
if grep -q "FROM gcr.io/distroless/nodejs22-debian13 AS runner" "${WORK_DIR}/Dockerfile"; then
|
||||
pass
|
||||
else
|
||||
fail "expected distroless runner image in Dockerfile"
|
||||
fail "expected distroless debian13 runner image in Dockerfile"
|
||||
fi
|
||||
teardown
|
||||
|
||||
echo -n " TEST: does not use the debian12 runner (open OpenSSL CVEs)... "
|
||||
setup
|
||||
cat > "${WORK_DIR}/.munitor.yml" <<'EOF'
|
||||
pipeline: node-webapp
|
||||
image_name: my-webapp
|
||||
node_version: "22"
|
||||
EOF
|
||||
run_generate > /dev/null
|
||||
if ! grep -q "debian12" "${WORK_DIR}/Dockerfile"; then
|
||||
pass
|
||||
else
|
||||
fail "expected no debian12 base image"
|
||||
fi
|
||||
teardown
|
||||
|
||||
@@ -589,6 +604,22 @@ else
|
||||
fi
|
||||
teardown
|
||||
|
||||
echo -n " TEST: pnpm node-webapp uses distroless debian13 runner... "
|
||||
setup
|
||||
cat > "${WORK_DIR}/.munitor.yml" <<'EOF'
|
||||
pipeline: node-webapp
|
||||
image_name: my-webapp
|
||||
node_version: "22"
|
||||
package_manager: pnpm
|
||||
EOF
|
||||
run_generate > /dev/null
|
||||
if grep -q "FROM gcr.io/distroless/nodejs22-debian13 AS runner" "${WORK_DIR}/Dockerfile"; then
|
||||
pass
|
||||
else
|
||||
fail "expected distroless debian13 runner image in pnpm Dockerfile"
|
||||
fi
|
||||
teardown
|
||||
|
||||
# =============================================================================
|
||||
# Test: node-api (nextjs) with pnpm generates correct Dockerfile
|
||||
# =============================================================================
|
||||
|
||||
Reference in new issue
Block a user