优化jenkins
This commit is contained in:
Vendored
-5
@@ -108,13 +108,8 @@ pipeline {
|
||||
steps {
|
||||
script {
|
||||
def cfg = PROJECT_CONFIG[params.PROJECT_NAME]
|
||||
def buildDir = cfg.buildDir ?: params.PROJECT_NAME
|
||||
def imageTag = env.BUILD_TAG.toLowerCase()
|
||||
dir("projects/${cfg.imageName}") {
|
||||
// fangjia-script 构建产物在 deliverables/script/target/classes,需同步过来
|
||||
if (cfg.buildDir) {
|
||||
sh "rsync -a --delete ../../deliverables/${buildDir}/target/classes/ target/classes/"
|
||||
}
|
||||
withDockerRegistry(credentialsId: 'DockerNexus', url: "http://${REGISTRY}") {
|
||||
sh "docker build -t ${REGISTRY}/${cfg.imageName}:${imageTag} ."
|
||||
sh "docker tag ${REGISTRY}/${cfg.imageName}:${imageTag} ${REGISTRY}/${cfg.imageName}:latest"
|
||||
|
||||
Reference in New Issue
Block a user