better Jenkons file
All checks were successful
platform/bro/pipeline/head This commit looks good

This commit is contained in:
Primakov Alexandr Alexandrovich 2024-08-07 23:22:10 +03:00
parent 1cd1e26751
commit 99e6d64011

20
Jenkinsfile vendored
View File

@ -10,10 +10,28 @@ pipeline {
steps { steps {
sh 'node -v' sh 'node -v'
sh 'npm -v' sh 'npm -v'
script {
String tag = sh(returnStdout: true, script: 'git tag --contains').trim()
String branchName = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim()
String commit = sh(returnStdout: true, script: 'git log -1 --oneline').trim()
String commitMsg = commit.substring(commit.indexOf(' ')).trim()
if (tag) {
currentBuild.displayName = "#${BUILD_NUMBER}, tag ${tag}"
} else {
currentBuild.displayName = "#${BUILD_NUMBER}, branch ${branchName}"
}
String author = sh(returnStdout: true, script: "git log -1 --pretty=format:'%an'").trim()
currentBuild.description = "${author}<br />${commitMsg}"
echo 'starting installing'
sh 'npm ci' sh 'npm ci'
} }
} }
}
stage('checks') {
parallel {
stage('eslint') { stage('eslint') {
steps { steps {
sh 'npm run eslint' sh 'npm run eslint'
@ -25,6 +43,8 @@ pipeline {
sh 'npm run build' sh 'npm run build'
} }
} }
}
}
stage('clean-all') { stage('clean-all') {
steps { steps {