FarmMapsLib/Jenkinsfile.develop

38 lines
878 B
Plaintext
Raw Normal View History

2019-07-16 14:29:37 +00:00
pipeline {
agent any
environment {
2019-07-16 15:25:26 +00:00
PACKAGE_VERSION_PREFIX=sh(script: 'jq .version package.json |sed "s/\\"//g"', returnStdout: true).trim()
PACKAGE_VERSION="${PACKAGE_VERSION_PREFIX + '-prerelease.' + env.BUILD_NUMBER}"
}
2019-07-16 14:29:37 +00:00
stages {
stage('npm install'){
steps {
sh '''npm install'''
}
}
stage('build'){
steps {
2019-07-17 13:08:14 +00:00
sh '''ng build common'''
2019-07-16 14:29:37 +00:00
}
}
2019-07-16 14:32:58 +00:00
stage('npm publish'){
steps {
sh '''cd dist/common
npm version ${PACKAGE_VERSION}
2019-07-16 14:32:58 +00:00
npm publish'''
}
}
2019-07-16 14:29:37 +00:00
}
post {
always {
emailext (
body: '${DEFAULT_CONTENT}',
mimeType: 'text/html',
replyTo: '${DEFAULT_REPLYTO}',
subject: '${DEFAULT_SUBJECT}',
to: emailextrecipients([[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']])
)
}
}
}