From 96c3816313150c0ecd47f45b6b02023df7418540 Mon Sep 17 00:00:00 2001 From: Egon Elbre Date: Thu, 7 Jul 2022 19:54:26 +0300 Subject: [PATCH] build: add timeout to npm install Add timeout to npm install and increase logging level. npm install is still taking sometimes too long and it's not clear why, verbose logging is not sufficient. Change-Id: Ib72f9823f30c9744562e279c2a5481f096e38128 --- Jenkinsfile.premerge | 12 ++++++++---- Jenkinsfile.verify | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile.premerge b/Jenkinsfile.premerge index e63fbc99e..d57f34288 100644 --- a/Jenkinsfile.premerge +++ b/Jenkinsfile.premerge @@ -49,12 +49,16 @@ pipeline { } } stage('Build Web') { + options { + timeout(time: 6, unit: "MINUTES") + } + // The build code depends on the following assets being loaded. parallel { stage('web/satellite') { steps { dir('web/satellite') { - sh 'npm install --prefer-offline --no-audit --loglevel verbose' + sh 'npm install --prefer-offline --no-audit --loglevel silly' sh './scripts/build-wasm.sh' sh 'npm run build' } @@ -63,7 +67,7 @@ pipeline { stage('web/storagenode') { steps { dir('web/storagenode') { - sh 'npm install --prefer-offline --no-audit --loglevel verbose' + sh 'npm install --prefer-offline --no-audit --loglevel silly' sh 'npm run build' } } @@ -71,7 +75,7 @@ pipeline { stage('web/multinode') { steps { dir('web/multinode') { - sh 'npm install --prefer-offline --no-audit --loglevel verbose' + sh 'npm install --prefer-offline --no-audit --loglevel silly' sh 'npm run build' } } @@ -79,7 +83,7 @@ pipeline { stage('satellite/admin/ui') { steps { dir('satellite/admin/ui') { - sh 'npm install --prefer-offline --no-audit --loglevel verbose' + sh 'npm install --prefer-offline --no-audit --loglevel silly' sh 'npm run build' } } diff --git a/Jenkinsfile.verify b/Jenkinsfile.verify index 70d6c478d..6a5a77e1a 100644 --- a/Jenkinsfile.verify +++ b/Jenkinsfile.verify @@ -91,6 +91,10 @@ pipeline { } stage('Build and Lint Web') { + options { + timeout(time: 6, unit: "MINUTES") + } + // The build code depends on the following assets being loaded. parallel { stage('web/satellite') { @@ -99,7 +103,7 @@ pipeline { } steps { dir('web/satellite') { - sh 'npm install --prefer-offline --no-audit --loglevel verbose' + sh 'npm install --prefer-offline --no-audit --loglevel silly' sh './scripts/build-wasm.sh' sh 'npm run build' @@ -122,7 +126,7 @@ pipeline { } steps { dir("web/storagenode") { - sh 'npm install --prefer-offline --no-audit --loglevel verbose' + sh 'npm install --prefer-offline --no-audit --loglevel silly' sh 'npm run build' sh 'npm run lint-ci' sh script: 'npm audit', returnStatus: true @@ -137,7 +141,7 @@ pipeline { } steps { dir("web/multinode") { - sh 'npm install --prefer-offline --no-audit --loglevel verbose' + sh 'npm install --prefer-offline --no-audit --loglevel silly' sh 'npm run build' sh 'npm run lint-ci' sh script: 'npm audit', returnStatus: true @@ -152,7 +156,7 @@ pipeline { } steps { dir("satellite/admin/ui") { - sh 'npm install --prefer-offline --no-audit --loglevel verbose' + sh 'npm install --prefer-offline --no-audit --loglevel silly' sh 'npm run build' sh script: 'npm audit', returnStatus: true sh 'npm run check'