This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
cyber-narrator-cn-ui/.gitlab-ci.yml
2021-06-21 12:24:55 +08:00

45 lines
825 B
YAML

stages:
- build_project
- build_image
cache:
key:
files:
- package.json
paths:
- node_modules
before_script:
- export CNUI_TAG=$(date +%Y%m%d%H%M%S)
build_project:
stage: build_project
script:
- echo "npm install ..."
- npm install --unsafe-perm
- echo "npm run build"
- npm run build
artifacts:
paths:
- dist
only:
- dev
tags:
- GN-XXG-Server
build_image:
stage: build_image
script:
- echo "docker build"
- sudo docker build -t dev_cn-ui:$CNUI_TAG .
- echo "docker tag"
- sudo docker tag dev_cn-ui:$CNUI_TAG 192.168.40.153:9080/cyber-narrator/dev_cn-ui:$CNUI_TAG
- echo "docker push"
- sudo docker push 192.168.40.153:9080/cyber-narrator/dev_cn-ui:$CNUI_TAG
when: on_success
only:
- dev
tags:
- GN-XXG-Server