Skip to content

Commit 5571979

Browse files
committed
Start deprecation of bundled datadog-ci: add Dockerfile shim
1 parent df14f5b commit 5571979

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@ FROM node:24-bookworm-slim
5151
RUN npm install -g @datadog/datadog-ci@^4 --no-audit --no-fund --progress=false --no-update-notifier --loglevel=error && \
5252
datadog-ci --version
5353

54+
# Add passthrough datadog-ci shim that logs a deprecation notice
55+
RUN DATADOG_CI_PATH=$(command -v datadog-ci) && \
56+
mv "$DATADOG_CI_PATH" "$DATADOG_CI_PATH-target" && \
57+
printf '#!/bin/sh\n\
58+
echo "================================================================================" >&2\n\
59+
echo "WARNING:" >&2\n\
60+
echo "The datadog-ci binary in this container will be removed in a future release." >&2\n\
61+
echo "Please install datadog-ci separately in your environment if you need it." >&2\n\
62+
echo "" >&2\n\
63+
echo "If using datadog-static-analyzer-github-action, consider upgrading to v3." >&2\n\
64+
echo "================================================================================" >&2\n\
65+
exec "%s-target" "$@"\n' "$DATADOG_CI_PATH" > "$DATADOG_CI_PATH" && \
66+
chmod +x "$DATADOG_CI_PATH"
67+
5468
COPY --from=builder /target/datadog-static-analyzer /usr/bin/datadog-static-analyzer
5569
COPY --from=builder /target/datadog-static-analyzer-server /usr/bin/datadog-static-analyzer-server
5670
COPY --from=builder /target/datadog-static-analyzer-git-hook /usr/bin/datadog-static-analyzer-git-hook

0 commit comments

Comments
 (0)