Skip to content

Commit

Permalink
[Heartbeat]: use node version 18 for HB images (#34469)
Browse files Browse the repository at this point in the history
add changelog

remove duplicate env variable

Co-authored-by: Emilio Alvarez Piñeiro <95703246+emilioalvap@users.noreply.github.com>
  • Loading branch information
vigneshshanmugam and emilioalvap committed Feb 24, 2023
1 parent cf1276a commit bf388ae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Expand Up @@ -15,6 +15,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
*Filebeat*

*Heartbeat*
- Update the recommended Node.js version to 18.12.0 for Synthetics {pull}15196[15196]

*Metricbeat*

Expand Down
Expand Up @@ -127,7 +127,7 @@ RUN mkdir -p {{ $beatHome }}/data/{{.BeatName}}-{{ commit_short }}/{{ .beats_ins
chmod 0644 {{ $beatHome }}/data/{{.BeatName}}-{{ commit_short }}/{{ .beats_install_path }}/*/*.yml && \
# heartbeat requires cap_net_raw,cap_setuid to run ICMP checks and change npm user
setcap cap_net_raw,cap_setuid+p {{ $beatHome }}/data/{{.BeatName}}-{{ commit_short }}/{{ .beats_install_path }}/heartbeat-*/heartbeat

{{- if (and (contains .image_name "-complete") (not (contains .from "ubi-minimal"))) }}
ENV NODE_PATH={{ $beatHome }}/.node
RUN echo \
Expand All @@ -140,7 +140,7 @@ RUN echo \
# Setup synthetics env vars
ENV ELASTIC_SYNTHETICS_CAPABLE=true
ENV SUITES_DIR={{ $beatHome }}/suites
ENV NODE_VERSION=14.17.5
ENV NODE_VERSION=18.12.0
ENV PATH="$NODE_PATH/node/bin:$PATH"
# Install the latest version of @elastic/synthetics forcefully ignoring the previously
# cached node_modules, heartbeat then calls the global executable to run test suites
Expand All @@ -167,7 +167,7 @@ RUN chown -R {{ .user }} $NODE_PATH
USER {{ .user }}
# If this fails dump the NPM logs
RUN npm i -g --loglevel verbose -f @elastic/synthetics@stack_release || sh -c 'tail -n +1 /root/.npm/_logs/* && exit 1'
RUN chmod ug+rwX -R $NODE_PATH
RUN chmod ug+rwX -R $NODE_PATH
USER root

# Install the deps as needed by the exact version of playwright elastic synthetics uses
Expand All @@ -180,7 +180,7 @@ RUN for iter in {1..10}; do \
fonts-noto \
fonts-noto-cjk && \
exit_code=0 && break || exit_code=$? && echo "apt-get error: retry $iter in 10s" && sleep 10; \
done; \
done; \
(exit $exit_code)
{{- end }}

Expand Down
7 changes: 3 additions & 4 deletions dev-tools/packaging/templates/docker/Dockerfile.tmpl
Expand Up @@ -122,8 +122,7 @@ RUN echo \
# Setup synthetics env vars
ENV ELASTIC_SYNTHETICS_CAPABLE=true
ENV SUITES_DIR={{ $beatHome }}/suites
# ENV NODE_VERSION=18.12.0
ENV NODE_VERSION=14.17.5
ENV NODE_VERSION=18.12.0
ENV PATH="$NODE_PATH/node/bin:$PATH"
# Install the latest version of @elastic/synthetics forcefully ignoring the previously
# cached node_modules, heartbeat then calls the global executable to run test suites
Expand Down Expand Up @@ -153,7 +152,7 @@ RUN chown -R {{ .user }} $NODE_PATH
USER {{ .user }}
# If this fails dump the NPM logs
RUN npm i -g --loglevel verbose -f @elastic/synthetics@stack_release || sh -c 'tail -n +1 /root/.npm/_logs/* && exit 1'
RUN chmod ug+rwX -R $NODE_PATH
RUN chmod ug+rwX -R $NODE_PATH
USER root

# Install the deps as needed by the exact version of playwright elastic synthetics uses
Expand All @@ -166,7 +165,7 @@ RUN for iter in {1..10}; do \
fonts-noto \
fonts-noto-cjk && \
exit_code=0 && break || exit_code=$? && echo "apt-get error: retry $iter in 10s" && sleep 10; \
done; \
done; \
(exit $exit_code)
{{- end }}
{{- end }}
Expand Down

0 comments on commit bf388ae

Please sign in to comment.