You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.9 KiB
44 lines
1.9 KiB
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Compile Java') {
|
|
steps {
|
|
sh 'mvn clean package -Dmaven.test.skip=true'
|
|
}
|
|
}
|
|
|
|
stage('Archive') {
|
|
steps {
|
|
archiveArtifacts artifacts: 'dk-auth/target/dk-auth.jar', fingerprint: true
|
|
archiveArtifacts artifacts: 'dk-gateway/target/dk-gateway.jar', fingerprint: true
|
|
archiveArtifacts artifacts: 'dk-modules/resource/resource.jar', fingerprint: true
|
|
archiveArtifacts artifacts: 'dk-modules/business/target/business.jar', fingerprint: true
|
|
archiveArtifacts artifacts: 'dk-modules/sample/sample.jar', fingerprint: true
|
|
archiveArtifacts artifacts: 'dk-modules/system/target/system.jar', fingerprint: true
|
|
archiveArtifacts artifacts: 'dk-modules/workflow/target/workflow.jar', fingerprint: true
|
|
}
|
|
}
|
|
|
|
stage('Upload') {
|
|
steps {
|
|
script {
|
|
def jars = [
|
|
['src': 'dk-auth/target/dk-auth.jar', 'name': 'dk-auth'],
|
|
['src': 'dk-gateway/target/dk-gateway.jar', 'name': 'dk-gateway'],
|
|
['src': 'dk-modules/resource/resource.jar', 'name': 'resource'],
|
|
['src': 'dk-modules/business/target/business.jar', 'name': 'business'],
|
|
['src': 'dk-modules/sample/sample.jar', 'name': 'sample'],
|
|
['src': 'dk-modules/system/target/system.jar', 'name': 'system'],
|
|
['src': 'dk-modules/workflow/target/workflow.jar', 'name': 'workflow']
|
|
]
|
|
for (jar in jars) {
|
|
sh """
|
|
cp ${jar.src} ${jar.name}-${BRANCH_NAME}-${BUILD_NUMBER}.jar
|
|
|
|
"""
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|