From 91434584dd4588ac0018e2ddd5a2651c96052e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Alvarez=20Pi=C3=B1eiro?= <95703246+emilioalvap@users.noreply.github.com> Date: Thu, 27 Jun 2024 17:45:20 +0200 Subject: [PATCH] [Heartbeat] Upgrade node to latest LTS (#40038) * [Heartbeat] Upgrade node to latest LTS * Add changelog --- CHANGELOG.next.asciidoc | 1 + dev-tools/packaging/templates/docker/Dockerfile.tmpl | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 62670494896..201b8ab4f42 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -298,6 +298,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] *Heartbeat* - Added status to monitor run log report. +- Upgrade node to latest LTS v18.20.3. {pull}40038[40038] *Metricbeat* diff --git a/dev-tools/packaging/templates/docker/Dockerfile.tmpl b/dev-tools/packaging/templates/docker/Dockerfile.tmpl index 58e0e0fbca1..115119be427 100644 --- a/dev-tools/packaging/templates/docker/Dockerfile.tmpl +++ b/dev-tools/packaging/templates/docker/Dockerfile.tmpl @@ -123,7 +123,7 @@ RUN echo \ ENV ELASTIC_SYNTHETICS_CAPABLE=true ENV TZ=UTC ENV SUITES_DIR={{ $beatHome }}/suites -ENV NODE_VERSION=18.18.2 +ENV NODE_VERSION=18.20.3 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 @@ -152,7 +152,7 @@ RUN cd /usr/share/heartbeat/.node \ RUN chown -R {{ .user }} $NODE_PATH USER {{ .user }} # If this fails dump the NPM logs -RUN npm i -g --loglevel verbose --engine-strict @elastic/synthetics@stack_release || sh -c 'tail -n +1 /root/.npm/_logs/* && exit 1' +RUN npm i -g --loglevel verbose --production --engine-strict @elastic/synthetics@stack_release || sh -c 'tail -n +1 /root/.npm/_logs/* && exit 1' RUN chmod ug+rwX -R $NODE_PATH USER root