Skip to content

Commit b947012

Browse files
authored
Merge pull request #815 from DataDog/jason.foral/K9VULN-11560
[K9VULN-11560] Start deprecation of bundled datadog-ci
2 parents b0dddc4 + 981f4e9 commit b947012

2 files changed

Lines changed: 21 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

misc/github-action.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
#!/bin/sh -l
22

3+
# NOTE:
4+
# This file is invoked by datadog-static-analyzer-github-action@v1 and v2. These actions are
5+
# no longer supported. Any proposed changes to the logic below should be added instead to the
6+
# action steps in datadog-static-analyzer-github-action@v3.
7+
8+
echo "::warning title=Unsupported Action Version::datadog-static-analyzer-github-action@v1 and v2 are unsupported.%0A%0AConsider upgrading to v3.%0A%0ASee: https://github.com/DataDog/datadog-static-analyzer-github-action/releases/tag/v3.0.0"
9+
310
########################################################
411
# Check variables
512
########################################################

0 commit comments

Comments
 (0)