FarmMapsLib/Jenkinsfile.develop

54 lines
1.4 KiB
Plaintext
Raw Normal View History

2019-11-25 13:47:20 +00:00
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 {
2020-08-11 17:03:05 +00:00
sh '''rm -rf node_modules/
2021-11-25 10:15:34 +00:00
npm install --legacy-peer-deps
2019-11-25 13:47:20 +00:00
cd projects/common
2021-11-25 10:15:34 +00:00
npm install --legacy-peer-deps
2019-11-25 13:47:20 +00:00
cd ../common-map
2021-11-25 10:15:34 +00:00
npm install --legacy-peer-deps
2020-10-02 15:23:11 +00:00
cd ../common-map3d
2021-11-25 10:15:34 +00:00
npm install --legacy-peer-deps
2019-11-25 13:47:20 +00:00
'''
}
}
stage('build'){
steps {
sh '''ng build common
2020-10-02 15:23:11 +00:00
ng build common-map
ng build common-map3d'''
2019-11-25 13:47:20 +00:00
}
}
stage('npm publish'){
steps {
sh '''cd dist/common
npm version ${PACKAGE_VERSION}
npm publish
cd ../common-map
npm version ${PACKAGE_VERSION}
2020-10-02 15:23:11 +00:00
npm publish
cd ../common-map3d
npm version ${PACKAGE_VERSION}
npm publish'''
2019-11-25 13:47:20 +00:00
}
}
}
post {
always {
emailext (
body: '${DEFAULT_CONTENT}',
mimeType: 'text/html',
replyTo: '${DEFAULT_REPLYTO}',
subject: '${DEFAULT_SUBJECT}',
to: emailextrecipients([[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']])
)
}
}
2019-07-16 14:29:37 +00:00
}