mirror of
https://github.com/valitydev/swag-my-documents.git
synced 2024-11-06 02:05:16 +00:00
88be285635
* BJ-1025: Initial swag for my-documents
59 lines
1.8 KiB
Groovy
59 lines
1.8 KiB
Groovy
#!groovy
|
|
// -*- mode: groovy -*-
|
|
|
|
build('swag-my-documents', 'docker-host') {
|
|
checkoutRepo()
|
|
loadBuildUtils('build_utils')
|
|
|
|
def pipeDefault
|
|
def withWsCache
|
|
def gitUtils
|
|
runStage('load pipeline') {
|
|
env.JENKINS_LIB = "build_utils/jenkins_lib"
|
|
pipeDefault = load("${env.JENKINS_LIB}/pipeDefault.groovy")
|
|
withWsCache = load("${env.JENKINS_LIB}/withWsCache.groovy")
|
|
gitUtils = load("${env.JENKINS_LIB}/gitUtils.groovy")
|
|
}
|
|
|
|
pipeDefault() {
|
|
|
|
runStage('install-deps') {
|
|
withWsCache("node_modules") {
|
|
sh 'make wc_install'
|
|
}
|
|
}
|
|
|
|
runStage('validate-spec') {
|
|
sh 'make wc_validate'
|
|
}
|
|
|
|
runStage('bundle') {
|
|
sh 'make wc_build'
|
|
}
|
|
|
|
// Java
|
|
runStage('build java client & server') {
|
|
withCredentials([[$class: 'FileBinding', credentialsId: 'java-maven-settings.xml', variable: 'SETTINGS_XML']]) {
|
|
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('epic/')) {
|
|
sh 'make SETTINGS_XML=${SETTINGS_XML} BRANCH_NAME=${BRANCH_NAME} java.swag.deploy_client'
|
|
sh 'make SETTINGS_XML=${SETTINGS_XML} BRANCH_NAME=${BRANCH_NAME} java.swag.deploy_server'
|
|
} else {
|
|
sh 'make SETTINGS_XML=${SETTINGS_XML} BRANCH_NAME=${BRANCH_NAME} java.swag.compile_client'
|
|
sh 'make SETTINGS_XML=${SETTINGS_XML} BRANCH_NAME=${BRANCH_NAME} java.swag.compile_server'
|
|
}
|
|
}
|
|
}
|
|
|
|
// Release
|
|
if (env.BRANCH_NAME == 'master' || env.BRANCH_NAME.startsWith('epic/')) {
|
|
runStage('publish release bundle') {
|
|
dir("web_deploy") {
|
|
gitUtils.push(commitMsg: "Generated from commit: $COMMIT_ID \n\non $BRANCH_NAME in $RBK_REPO_URL\n\nChanges:\n$COMMIT_MSG",
|
|
files: "*", branch: "release/$BRANCH_NAME", orphan: true)
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|