diff --git a/Jenkinsfile b/Jenkinsfile index ce9dddd..df23bbe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,7 +25,8 @@ pipeline { } stage('构建镜像') { // 阶段4:构建Docker镜像 steps { - echo '构建镜像--成功' // 打印信息表示镜像构建阶段成功完成 + sh '''mv ./target/*.jar ./docker +docker build -t ${JOB_NAME}:${tag} ./docker''' } } stage('推送镜像到Harbor') { // 阶段5:将构建的镜像推送至Harbor仓库