scode-eslint-config/Jenkinsfile

41 lines
1.1 KiB
Plaintext
Raw Normal View History

2019-12-20 13:27:02 +01:00
pipeline {
agent any
environment {
VERSION = VersionNumber([
versionNumberString:
'${BUILDS_ALL_TIME}',
2020-01-22 08:13:54 +01:00
versionPrefix: '1.2.',
2019-12-20 13:27:02 +01:00
worstResultForIncrement: 'SUCCESS'
])
publish = 0
}
stages {
stage('Setup') {
steps {
2019-12-20 13:32:15 +01:00
echo 'Setting up environment'
2020-02-05 17:58:56 +01:00
sh 'yarn --frozen-lockfile'
2019-12-20 13:27:02 +01:00
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'
2020-02-05 17:58:56 +01:00
sh 'yarn publish'
2019-12-20 13:27:02 +01:00
} else {
echo 'Build successful, Commit not marked for deploying'
currentBuild.result = "UNSTABLE"
}
}
}
}
}