2022-09-17 18:45:43 +03:00
|
|
|
stage('install:ci') {
|
2024-04-11 12:50:46 +03:00
|
|
|
def tag = sh(returnStdout: true, script: "git tag --contains").trim()
|
|
|
|
def branchName = sh(returnStdout: true, script: "git rev-parse --abbrev-ref HEAD").trim()
|
2024-08-05 12:58:55 +03:00
|
|
|
def commit = sh(returnStdout: true, script: 'git log -1 --oneline').trim()
|
|
|
|
String commitMsg = commit.substring( commit.indexOf(' ') ).trim()
|
2024-04-11 13:10:30 +03:00
|
|
|
def lastLog = sh(returnStdout: true, script: "git log -1").trim()
|
2024-04-11 12:47:41 +03:00
|
|
|
if (tag) {
|
2024-04-11 12:50:46 +03:00
|
|
|
currentBuild.displayName = "#${BUILD_NUMBER}, tag ${tag}"
|
2024-04-11 12:47:41 +03:00
|
|
|
} else {
|
2024-04-11 12:50:46 +03:00
|
|
|
currentBuild.displayName = "#${BUILD_NUMBER}, branch ${branchName}"
|
2024-04-11 12:47:41 +03:00
|
|
|
}
|
2024-08-04 10:02:54 +03:00
|
|
|
|
2024-08-05 12:58:55 +03:00
|
|
|
String author = sh(returnStdout: true, script: "git log -1 --pretty=format:'%an'").trim()
|
|
|
|
currentBuild.description = "${author}<br />${commitMsg}"
|
|
|
|
// currentBuild.description = "#${BUILD_NUMBER}, branch ${branchName}, tag ${tag ? tag : 'no tag'}\n\n${lastLog}"
|
2022-09-17 18:45:43 +03:00
|
|
|
echo 'starting installing'
|
2024-08-04 10:02:54 +03:00
|
|
|
sh "pwd"
|
2024-08-23 10:04:06 +03:00
|
|
|
sh 'npm ci --progress=false --loglevel=error --fetch-retries=3'
|
2022-09-17 18:45:43 +03:00
|
|
|
}
|