jenkins-scripts/install/ci/Jenkinsfile

14 lines
608 B
Plaintext
Raw Normal View History

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-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-04-11 12:56:36 +03:00
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"
2022-09-17 18:45:43 +03:00
sh 'npm ci'
}