[no publish] simplify ci

This commit is contained in:
Timo Hocker
2020-02-06 12:17:07 +01:00
parent fd26ee2614
commit 59249a3a1c
4 changed files with 30 additions and 26 deletions

21
Jenkinsfile vendored
View File

@ -8,32 +8,15 @@ pipeline {
versionPrefix: '1.2.',
worstResultForIncrement: 'SUCCESS'
])
publish = 0
}
stages {
stage('Setup') {
stage('Building') {
steps {
echo 'Setting up environment'
sh 'yarn --frozen-lockfile'
sh 'nodejs jenkins.js ${VERSION}'
script {
currentBuild.displayName = env.VERSION
}
}
}
}
post {
success {
script {
publish = sh script: "git log -1 | grep '\\[no publish\\]'", returnStatus: true
if (publish != 0) {
echo 'Deploying'
sh 'yarn publish'
} else {
echo 'Build successful, Commit not marked for deploying'
currentBuild.result = "UNSTABLE"
}
sh 'yarn ci ${VERSION}'
}
}
}