|
|
@@ -3,27 +3,27 @@ type: docker
|
|
|
name: default
|
|
|
|
|
|
steps:
|
|
|
-# # 步骤 1: Maven 构建
|
|
|
-# - name: build-with-maven
|
|
|
-# image: maven:3.8.5-openjdk-17-slim
|
|
|
-# volumes:
|
|
|
-# - name: cache
|
|
|
-# path: /root/.m2
|
|
|
-# commands:
|
|
|
-# - mvn clean package -DskipTests
|
|
|
-#
|
|
|
-# # 步骤 2: 构建 Docker 镜像并上传
|
|
|
-# - name: build-and-push-docker-image
|
|
|
-# image: plugins/docker
|
|
|
-# settings:
|
|
|
-# username:
|
|
|
-# from_secret: docker-username
|
|
|
-# password:
|
|
|
-# from_secret: docker-password
|
|
|
-# registry: registry.cn-hangzhou.aliyuncs.com
|
|
|
-# repo: registry.cn-hangzhou.aliyuncs.com/english-ai/eai-backend
|
|
|
-# tags: latest
|
|
|
-# dockerfile: Dockerfile
|
|
|
+ # 步骤 1: Maven 构建
|
|
|
+ - name: build-with-maven
|
|
|
+ image: maven:3.8.5-openjdk-17-slim
|
|
|
+ volumes:
|
|
|
+ - name: cache
|
|
|
+ path: /root/.m2
|
|
|
+ commands:
|
|
|
+ - mvn clean package -DskipTests
|
|
|
+
|
|
|
+ # 步骤 2: 构建 Docker 镜像并上传
|
|
|
+ - name: build-and-push-docker-image
|
|
|
+ image: plugins/docker
|
|
|
+ settings:
|
|
|
+ username:
|
|
|
+ from_secret: docker-username
|
|
|
+ password:
|
|
|
+ from_secret: docker-password
|
|
|
+ registry: registry.cn-hangzhou.aliyuncs.com
|
|
|
+ repo: registry.cn-hangzhou.aliyuncs.com/english-ai/eai-backend
|
|
|
+ tags: latest
|
|
|
+ dockerfile: Dockerfile
|
|
|
|
|
|
# 步骤 3: 调用脚本进行部署
|
|
|
- name: deploy-with-ssh
|