Use this category to discuss the doubts and questions about the Jenkins course on KodeKloud
My Scripit:-
pipeline {
agent any
tools {
nodejs ‘NodeJS 16.20.2’
dependencyCheck ‘OWASP Dependency Check’
}
stages {
stage('CheckOut'){
steps{
dir('express-repo'){
git url: 'https://github.com/expressjs/express.git', branch: 'master'
}
}
}
stage('Print NodeJS and NPM Versions') {
steps {
sh 'node -v'
}
}
stage('Install Dependencies') {
steps {
dir('express-repo') {
sh 'npm install'
}
}
}
stage('Run Unit Test') {
steps {
dir('express-repo') {
sh 'npm test'
}
}
}
stage('OWASP Dependency Check') {
steps {
dependencyCheck odcInstallation: 'OWASP Dependency Check',
additionalArguments: '--format XML --scan "express-repo/examples/hello-world"'
}
}
}
}
Here is the Error in the pipeline and I configure the in the plugin in the tool section

