Add jenkins file for master
Some checks failed
FarmMaps/FarmMapsLib/pipeline/head There was a failure building this commit
Some checks failed
FarmMaps/FarmMapsLib/pipeline/head There was a failure building this commit
This commit is contained in:
parent
fb9a046ff8
commit
34b067fd28
54
Jenkinsfile
vendored
Normal file
54
Jenkinsfile
vendored
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
environment {
|
||||||
|
PACKAGE_VERSION_PREFIX=sh(script: 'jq .version package.json |sed "s/\\"//g"', returnStdout: true).trim()
|
||||||
|
PACKAGE_VERSION="${PACKAGE_VERSION_PREFIX + '.' + env.BUILD_NUMBER}"
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('npm install'){
|
||||||
|
steps {
|
||||||
|
sh '''rm -rf node_modules/
|
||||||
|
npm install
|
||||||
|
cd projects/common
|
||||||
|
npm install
|
||||||
|
cd ../common-map
|
||||||
|
npm install
|
||||||
|
cd ../common-map3d
|
||||||
|
npm install
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('build'){
|
||||||
|
steps {
|
||||||
|
sh '''ng build common
|
||||||
|
ng build common-map
|
||||||
|
ng build common-map3d'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('npm publish'){
|
||||||
|
steps {
|
||||||
|
sh '''cd dist/common
|
||||||
|
npm version ${PACKAGE_VERSION}
|
||||||
|
npm publish
|
||||||
|
cd ../common-map
|
||||||
|
npm version ${PACKAGE_VERSION}
|
||||||
|
npm publish
|
||||||
|
cd ../common-map3d
|
||||||
|
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']])
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user