From d109abe78fcb0784be61035c4fd20f8c398741e6 Mon Sep 17 00:00:00 2001 From: Esteban Laver <10552966+emlaver@users.noreply.github.com> Date: Wed, 29 Nov 2023 08:51:40 -0500 Subject: [PATCH] build: update Node version information Signed-off-by: Esteban Laver <10552966+emlaver@users.noreply.github.com> --- Jenkinsfile | 44 ++++++++++++++++++++++++-------------------- README.md | 2 +- package-lock.json | 2 +- package.json | 2 +- 4 files changed, 27 insertions(+), 23 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ea2f7478..b2297b6f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -101,6 +101,7 @@ def agentYaml() { | memory: "4Gi" | cpu: "4" ${nodeYaml(18)} + ${nodeYaml(21)} |restartPolicy: Never""".stripMargin('|') } @@ -167,13 +168,11 @@ pipeline { stages { stage('Build') { steps { - container('node18') { - withCredentials([usernamePassword(usernameVariable: 'NPMRC_USER', passwordVariable: 'NPMRC_TOKEN', credentialsId: 'artifactory')]) { - withEnv(['NPMRC_EMAIL=' + env.NPMRC_USER]) { - withNpmEnv(registryArtifactoryDown) { - sh 'npm ci' - sh 'npm install mocha-jenkins-reporter --no-save' - } + withCredentials([usernamePassword(usernameVariable: 'NPMRC_USER', passwordVariable: 'NPMRC_TOKEN', credentialsId: 'artifactory')]) { + withEnv(['NPMRC_EMAIL=' + env.NPMRC_USER]) { + withNpmEnv(registryArtifactoryDown) { + sh 'npm ci' + sh 'npm install mocha-jenkins-reporter --no-save' } } } @@ -184,26 +183,22 @@ pipeline { // Stages that run on LTS version from full agent default container stage('Lint') { steps { - container('node18') { + script{ sh 'npm run lint' } } } stage('Node LTS') { steps { - container('node18') { - script{ - runTest('18') - } + script{ + runTest('20') } } } stage('IAM Node LTS') { steps { - container('node18') { - script{ - runTest('18', '-i -g \'#unit|#slowe\'', 'test-iam') - } + script{ + runTest('20', '-i -g \'#unit|#slowe\'', 'test-iam') } } } @@ -212,18 +207,27 @@ pipeline { beforeAgent true environment name: 'RUN_TOXY_TESTS', value: 'true' } + steps { + script{ + runTest('20', '', 'test-network/conditions') + } + } + } + stage('Node 18x') { steps { container('node18') { script{ - runTest('18', '', 'test-network/conditions') + runTest('18') } } } } - stage('Node 20x') { + stage('Node 21x') { steps { - script{ - runTest('20') + container('node21') { + script{ + runTest('21') + } } } } diff --git a/README.md b/README.md index ab02e3e6..efd9e8c6 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ npm install -g @cloudant/couchbackup ``` ### Requirements -* Node.js LTS version 18. +* Node.js LTS version 18 or 20. * The minimum required CouchDB version is 2.0.0. ### Snapshots diff --git a/package-lock.json b/package-lock.json index 2d0fd259..f11387ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,7 @@ "uuid": "9.0.1" }, "engines": { - "node": "^18" + "node": "^18 || ^20" }, "peerDependencies": { "axios": "^1.6.0", diff --git a/package.json b/package.json index 7b2e1f96..69b2d208 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "license": "Apache-2.0", "engines": { - "node": "^18" + "node": "^18 || ^20" }, "dependencies": { "@ibm-cloud/cloudant": "0.8.0",