Skip to content

Commit

Permalink
Install NodeJS in Prow image (#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
aliok authored Aug 12, 2024
1 parent 0619026 commit 7dca172
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions images/prow-tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ ARG TFENV_VERSION=v2.2.3
ARG KOPS_VERSION=v1.25.0
ARG CHART_RELEASER_VERSION=1.6.0
ARG HELM_VERSION=v3.12.2
ARG NODE_VERSION=21.7.3
ARG NVM_VERSION=0.40.0
ARG COMMIT_HASH

RUN echo "${COMMIT_HASH}" > /commit_hash
Expand Down Expand Up @@ -167,6 +169,26 @@ RUN java -version && \
# END: JAVA SETUP
#

#
# BEGIN: NODEJS SETUP
#

ENV NVM_DIR=/usr/local/nvm
RUN mkdir -p $NVM_DIR
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v${NVM_VERSION}/install.sh | bash
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
ENV PATH="${NVM_DIR}/versions/node/v${NODE_VERSION}/bin/:${PATH}"
RUN npm install -g yarn
RUN node --version
RUN npm --version
RUN yarn --version

#
# END: NODEJS SETUP
#

# protoc and required golang tooling
RUN curl -fsSL "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip" -o protoc.zip \
&& unzip -p protoc.zip bin/protoc > /usr/local/bin/protoc \
Expand Down

0 comments on commit 7dca172

Please sign in to comment.