[no publish] simplify ci

This commit is contained in:
Timo Hocker
2020-02-06 12:05:38 +01:00
parent 9457505a4c
commit e67d76029e
4 changed files with 21 additions and 28 deletions

26
Jenkinsfile vendored
View File

@ -12,34 +12,12 @@ pipeline {
}
stages {
stage('Setup') {
stage('Building') {
steps {
echo 'Setting up test environment'
sh 'yarn --frozen-lockfile'
sh 'nodejs jenkins.js ${VERSION}'
script {
currentBuild.displayName = env.VERSION
}
}
}
stage('Testing') {
steps {
echo 'Running tests...'
sh 'npm test'
}
}
}
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}'
}
}
}