Jenkinsfile update
This commit is contained in:
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@@ -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 🚚"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user