[fix]:[20251208][drone 增加前端工程的cicd 7]
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
8e739da04c
commit
1e8c2e0d74
@ -180,7 +180,7 @@ steps:
|
|||||||
path: /var/run/docker.sock
|
path: /var/run/docker.sock
|
||||||
commands:
|
commands:
|
||||||
- docker info
|
- docker info
|
||||||
- docker build -t ${DRONE_REPO_NAME}-frontend:latest -f vue-ui/Dockerfile vue-ui
|
- docker build -t ${DRONE_REPO_NAME}-frontend:latest -f docker/Dockerfile-frontend vue-ui
|
||||||
- docker tag ${DRONE_REPO_NAME}-frontend:latest ${DRONE_REPO_NAME}-frontend:${DRONE_COMMIT_SHA:0:8}
|
- docker tag ${DRONE_REPO_NAME}-frontend:latest ${DRONE_REPO_NAME}-frontend:${DRONE_COMMIT_SHA:0:8}
|
||||||
- docker images ${DRONE_REPO_NAME}-frontend
|
- docker images ${DRONE_REPO_NAME}-frontend
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -202,7 +202,7 @@ steps:
|
|||||||
fi
|
fi
|
||||||
echo "📦 Building Docker image: ${DRONE_REPO_NAME}:latest"
|
echo "📦 Building Docker image: ${DRONE_REPO_NAME}:latest"
|
||||||
ls -lh target/drone-test-1.0.jar
|
ls -lh target/drone-test-1.0.jar
|
||||||
docker build -t ${DRONE_REPO_NAME}:latest -f Dockerfile .
|
docker build -t ${DRONE_REPO_NAME}:latest -f docker/Dockerfile .
|
||||||
docker tag ${DRONE_REPO_NAME}:latest ${DRONE_REPO_NAME}:${DRONE_COMMIT_SHA:0:8}
|
docker tag ${DRONE_REPO_NAME}:latest ${DRONE_REPO_NAME}:${DRONE_COMMIT_SHA:0:8}
|
||||||
docker images ${DRONE_REPO_NAME}
|
docker images ${DRONE_REPO_NAME}
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@ -11,7 +11,7 @@ RUN npm config set registry https://registry.npmmirror.com \
|
|||||||
&& npm ci --no-audit --no-fund
|
&& npm ci --no-audit --no-fund
|
||||||
|
|
||||||
# 复制源码并构建
|
# 复制源码并构建
|
||||||
COPY . .
|
COPY ../vue-ui .
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# 运行阶段,使用独立 nginx 镜像
|
# 运行阶段,使用独立 nginx 镜像
|
||||||
Loading…
x
Reference in New Issue
Block a user