update 5 files

This commit is contained in:
2025-01-21 00:39:42 +03:00
parent 81cffd5d61
commit 88768a5e4b
5 changed files with 38 additions and 53 deletions

17
Jenkinsfile vendored
View File

@@ -29,21 +29,10 @@ pipeline {
sh 'ls -la'
}
}
stage('Check for package.json changes') {
stage('Install npm package') {
steps {
echo "Check for package.json changes"
script {
// Check if package.json has changed
def hasChanges = sh(script: 'git diff --name-only HEAD~1 | grep "package.json"', returnStatus: true) == 0
if (hasChanges) {
echo "package.json changed, running npm install"
currentBuild.result = 'SUCCESS'
sh 'npm install'
} else {
echo "package.json not changed, skipping npm install"
currentBuild.result = 'SUCCESS'
}
}
echo "Install npm package"
sh 'npm install'
}
}
stage('Run Tests') {