FarmMapsLib/Jenkinsfile.develop
Willem Dantuma 529b1c9bd7
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
Upgrade @farmmaps/common-map to angular 8.2
2019-11-25 15:31:42 +01:00

47 lines
1.1 KiB
Plaintext

pipeline {
agent any
environment {
PACKAGE_VERSION_PREFIX=sh(script: 'jq .version package.json |sed "s/\\"//g"', returnStdout: true).trim()
PACKAGE_VERSION="${PACKAGE_VERSION_PREFIX + '-prerelease.' + env.BUILD_NUMBER}"
}
stages {
stage('npm install'){
steps {
sh '''npm install
cd projects/common
npm install
cd ../common-map
npm install
'''
}
}
stage('build'){
steps {
sh '''ng build common
ng build common-map'''
}
}
stage('npm publish'){
steps {
sh '''cd dist/common
npm version ${PACKAGE_VERSION}
npm publish
cd ../common-map
npm version ${PACKAGE_VERSION}
npm publish'''
}
}
}
post {
always {
emailext (
body: '${DEFAULT_CONTENT}',
mimeType: 'text/html',
replyTo: '${DEFAULT_REPLYTO}',
subject: '${DEFAULT_SUBJECT}',
to: emailextrecipients([[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']])
)
}
}
}