Files
startup-product/Jenkinsfile
T
nageshwaran_manikumar 0b5c0a8ab1
startup-product-gitea-ci/pipeline/head This commit looks good
Add Jenkins CI pipeline and Node.js automated tests
2026-10-22 20:48:38 -04:00

50 lines
977 B
Groovy

pipeline {
agent any
options {
disableConcurrentBuilds()
timeout(time: 5, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '5'))
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Verify Node.js') {
steps {
sh 'node --version'
sh 'npm --version'
}
}
stage('Syntax Check') {
steps {
dir('app') {
sh 'npm run check'
}
}
}
stage('Automated Tests') {
steps {
dir('app') {
sh 'npm test'
}
}
}
}
post {
success {
echo 'CI PASSED: All checks completed successfully.'
}
failure {
echo 'CI FAILED: Review the Jenkins console output.'
}
}
}