Jenkinsfile update

This commit is contained in:
2025-01-18 22:23:46 +03:00
parent e2576caecd
commit 2b23ee3f66

4
Jenkinsfile vendored
View File

@@ -31,6 +31,7 @@ pipeline {
} }
stage('Check for package.json changes') { stage('Check for package.json changes') {
steps { steps {
echo "Check for package.json changes"
script { script {
// Check if package.json has changed // Check if package.json has changed
def hasChanges = sh(script: 'git diff --name-only HEAD~1 | grep "package.json"', returnStatus: true) == 0 def hasChanges = sh(script: 'git diff --name-only HEAD~1 | grep "package.json"', returnStatus: true) == 0
@@ -47,12 +48,15 @@ pipeline {
} }
stage('Run Tests') { stage('Run Tests') {
steps { steps {
echo "Runing Test.."
sh 'npm test' sh 'npm test'
} }
} }
stage('Publish Test Results') { stage('Publish Test Results') {
steps { steps {
echo "Publish Test Results"
junit 'reports/test-results.xml' junit 'reports/test-results.xml'
echo "Send test result slack 🚚"
} }
} }
} }