pipeline { agent any environment { NODE_ENV = 'production' } stages { stage('Setup Node.js') { steps { nodejs(nodeJSInstallationName: 'Node23') { sh 'node -v' sh 'npm -v' } } } stage('Install Dependencies') { steps { nodejs(nodeJSInstallationName: 'Node23') { sh 'npm ci' } } } stage('Build') { steps { nodejs(nodeJSInstallationName: 'Node23') { sh 'npm run build' } } } stage('Deploy') { steps { echo 'Deploying application...' // Add your deployment steps here } } } post { always { cleanWs() } success { echo 'Pipeline completed successfully!' } failure { echo 'Pipeline failed!' } } }