feat: add gitlab-ci.yml
This commit is contained in:
26
.gitlab-ci.yml
Normal file
26
.gitlab-ci.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
stages:
|
||||
- build_project
|
||||
- build_image
|
||||
|
||||
build_project:
|
||||
stage: build_project
|
||||
script:
|
||||
- echo "npm install ..."
|
||||
- sudo npm install
|
||||
- echo "npm run build"
|
||||
- sudo npm run build
|
||||
only:
|
||||
- dev-cicd
|
||||
tags:
|
||||
- GN-XXG-Server
|
||||
|
||||
build_image:
|
||||
stage: build_image
|
||||
script:
|
||||
- docker build -t "${CI_REGISTRY_IMAGE}_cn-ui:latest" .
|
||||
- docker push "${CI_REGISTRY_IMAGE}_cn-ui:latest"
|
||||
when: on_success
|
||||
only:
|
||||
- dev-cicd
|
||||
tags:
|
||||
- GN-XXG-Server
|
||||
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM nginx:latest
|
||||
|
||||
MAINTAINER shizhendong shizhendong@zdjizhi.com
|
||||
|
||||
# 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面
|
||||
COPY dist/ /usr/share/nginx/html/
|
||||
|
||||
# nginx 配置 , 制作镜像时不做处理 , 容器可自己挂载配置文件
|
||||
#COPY nginx.conf /etc/nginx/nginx.conf
|
||||
Reference in New Issue
Block a user