From 93e2d532983979857e882267fd87b161e2e93313 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Tue, 19 Jul 2022 08:07:35 -0700 Subject: [PATCH] fix: "Dist" step failed in Jenkins with ELSPROBLEMS (#2831) The "Dist" step in the release process in Jenkinsfile was failing with npm ERR! code ELSPROBLEMS npm ERR! missing: @babel/cli@^7.8.4, required by elastic-apm-node@3.37.0 ... ditto for every *dev* dependency ... The part that was actually failing was 'npm ls --omit=dev --all --parseable' in "gen-notice.sh" when run in a dist try that only has the non-dev deps installed. The issue was a too-old npm: node 16.15.0 includes npm 8.5.5, but we require npm v8.7.0 to get support for 'npm ls --omit=dev ...' (https://github.com/npm/cli/pull/4744). --- .ci/Jenkinsfile | 2 +- dev-utils/gen-notice.sh | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index f310c5b0c0..4740983cbb 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { NOTIFY_TO = 'build-apm+apm-agent-nodejs@elastic.co' NPMRC_SECRET = 'secret/jenkins-ci/npmjs/elasticmachine' TOTP_SECRET = 'totp/code/npmjs-elasticmachine' - BUILD_NODE_VERSION = 'v16.15.0' + BUILD_NODE_VERSION = 'v16.15.1' DOCKER_REGISTRY = 'docker.elastic.co' DOCKER_SECRET = 'secret/apm-team/ci/docker-registry/prod' } diff --git a/dev-utils/gen-notice.sh b/dev-utils/gen-notice.sh index ef209f4589..62f8447cf0 100755 --- a/dev-utils/gen-notice.sh +++ b/dev-utils/gen-notice.sh @@ -53,13 +53,16 @@ DIST_DIR="$1" [[ -n "$DIST_DIR" ]] || fatal "missing DIST_DIR argument" [[ -f "$DIST_DIR/package.json" ]] || fatal "invalid DIST_DIR: $DIST_DIR/package.json does not exist" -# Guard against accidentally using this script with a too-old npm. -if [[ $(npm --version | cut -d. -f1) -lt 8 ]]; then +# Guard against accidentally using this script with a too-old npm (