-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## What This PR reapplies #866 that was previously reverted in #869. It contains upgrade for multiple dependencies to address critical- and high-level CVE. In addition to #866, it: * upgrades `npm` to address [CVE-2024-21538](https://scout.docker.com/vulnerabilities/id/CVE-2024-21538?s=github&n=cross-spawn&t=npm&vr=%3E%3D7.0.0%2C%3C7.0.5&utm_source=desktop&utm_medium=ExternalLink). * Sets `NODE_NO_WARNINGS=1` env in Dockerfile ([ref](https://nodejs.org/api/cli.html#node_no_warnings1)) in order to suppress Node.js deprecation warnings, that may interrupt end-user automations, that rely on exact CLi output. * Migrates from `pkg`, which is no longer maintained, to its fork `@yao-pkg/pkg`.
- Loading branch information
1 parent
7e49659
commit f0a514c
Showing
7 changed files
with
2,782 additions
and
2,529 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v18.17.1 | ||
v22.11.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,39 @@ | ||
# go hub binary | ||
FROM golang:alpine as go | ||
FROM golang:alpine AS go | ||
RUN apk --update add ca-certificates git | ||
RUN go install github.com/github/hub@latest | ||
|
||
# python yq binary | ||
FROM six8/pyinstaller-alpine:alpine-3.6-pyinstaller-v3.4 as yq | ||
FROM six8/pyinstaller-alpine:alpine-3.6-pyinstaller-v3.4 AS yq | ||
ARG YQ_VERSION=2.10.0 | ||
ENV PATH="/pyinstaller:$PATH" | ||
RUN pip install yq==${YQ_VERSION} | ||
RUN pyinstaller --noconfirm --onefile --log-level DEBUG --clean --distpath /tmp/ $(which yq) | ||
|
||
# kubectl binary | ||
FROM bitnami/kubectl:1.27.4 as kubectl | ||
FROM bitnami/kubectl:1.30.6 AS kubectl | ||
|
||
# Main | ||
FROM node:18.17.1-alpine3.18 | ||
|
||
FROM node:22.11.0-alpine3.20 | ||
RUN apk --update add --no-cache \ | ||
bash \ | ||
ca-certificates \ | ||
curl \ | ||
git \ | ||
jq | ||
|
||
RUN npm upgrade -g npm | ||
COPY --from=go /go/bin/hub /usr/local/bin/hub | ||
COPY --from=yq /tmp/yq /usr/local/bin/yq | ||
COPY --from=kubectl /opt/bitnami/kubectl/bin/kubectl /usr/local/bin/ | ||
|
||
WORKDIR /cf-cli | ||
|
||
COPY package.json yarn.lock check-version.js run-check-version.js /cf-cli/ | ||
|
||
RUN yarn install --prod --frozen-lockfile && \ | ||
yarn cache clean | ||
|
||
COPY . /cf-cli | ||
|
||
RUN yarn generate-completion | ||
|
||
RUN ln -s $(pwd)/lib/interface/cli/codefresh /usr/local/bin/codefresh | ||
|
||
RUN codefresh components update --location components | ||
|
||
# Node.js warnings must be suppressed to ensure that automations relying on exact output are not disrupted | ||
ENV NODE_NO_WARNINGS=1 | ||
ENTRYPOINT ["codefresh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.