Skip to content

Commit

Permalink
build: update Node version information
Browse files Browse the repository at this point in the history
Signed-off-by: Esteban Laver <10552966+emlaver@users.noreply.github.com>
  • Loading branch information
emlaver committed Nov 29, 2023
1 parent 69021be commit d109abe
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 23 deletions.
44 changes: 24 additions & 20 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def agentYaml() {
| memory: "4Gi"
| cpu: "4"
${nodeYaml(18)}
${nodeYaml(21)}
|restartPolicy: Never""".stripMargin('|')
}

Expand Down Expand Up @@ -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'
}
}
}
Expand All @@ -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')
}
}
}
Expand All @@ -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')
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"license": "Apache-2.0",
"engines": {
"node": "^18"
"node": "^18 || ^20"
},
"dependencies": {
"@ibm-cloud/cloudant": "0.8.0",
Expand Down

0 comments on commit d109abe

Please sign in to comment.