Commit 7b016fb1 authored by chenxushuo's avatar chenxushuo

Add new file

parent 3fedbcb5
Pipeline #15185 canceled with stages
in 5 seconds
# This file is a template, and might need editing before it works on your project.
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/
#services:
# - docker:dind
variables:
KUBECONFIG: /etc/deploy/config
##This folder is cached between builds
##http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
untracked: true
paths:
- ./node_modules
stages:
- build
- push
- deploy
build-node-dev:
image: node:11.2.0
stage: build
before_script:
- npm config set registry=http://registry.npm.taobao.org
- npm config set puppeteer_download_host=https://storage.googleapis.com.cnpmjs.org
- export APP_ENV_OS=dev
script:
- npm i
- npm run build
only:
- dev
tags:
- node-build-mac
#- svr251
cache:
paths:
- ./dist
docker-push-dev:
image: docker:stable
stage: push
# services:
# - docker:dind
# variables:
# DOCKER_HOST: tcp://localhost:2375
# DOCKER_DRIVER: overlay2
script:
- ls -al
- find ./ -name dist
- docker build -t registry.cn-shenzhen.aliyuncs.com/thinker-vc/light-admin-web:1.0.0 .
- docker push registry.cn-shenzhen.aliyuncs.com/thinker-vc/light-admin-web:1.0.0
tags:
- node-build-mac
#- svr251
only:
- dev
build-node-pro:
image: node:11.2.0
stage: build
before_script:
- npm config set registry=http://registry.npm.taobao.org
- npm config set puppeteer_download_host=https://storage.googleapis.com.cnpmjs.org
- export APP_ENV_OS=production
script:
- npm i
- npm run build
only:
- master
tags:
- node-build-mac
#- svr251
cache:
paths:
- ./dist
docker-push-pro:
image: docker:stable
stage: push
# services:
# - docker:dind
# variables:
# DOCKER_HOST: tcp://localhost:2375
# DOCKER_DRIVER: overlay2
script:
- ls -al
- find ./ -name dist
- docker build -t registry.cn-shenzhen.aliyuncs.com/thinker-vc/light-admin-web:release-1.0.0 .
- docker push registry.cn-shenzhen.aliyuncs.com/thinker-vc/light-admin-web:release-1.0.0
tags:
- node-build-mac
#- svr251
only:
- master
.deploy-prod:
stage: deploy
image: registry.cn-shenzhen.aliyuncs.com/thinker-open/helm-kubectl:v2.9.1-1.10.7
before_script:
- mkdir -p /etc/deploy
- echo ${kube_config} | base64 -d > ${KUBECONFIG}
- kubectl config use-context kubernetes-admin@kubernetes
- helm init --client-only --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
- helm repo add thinker http://thinkervc:thinker@helm@helm.thinker.vc/
- helm repo update
script:
- |
helm upgrade light-admin-web --install --reuse-values \
--set updateVersion=`date +%s` \
--set image.repository="registry-vpc.cn-shenzhen.aliyuncs.com/thinker-vc/light-admin-web" \
--set image.tag="release-1.0.0" \
--set ingress.host="light.admin.thinker.vc" \
--namespace light \
thinker/static
environment:
name: prod
url: light.admin.thinker.vc
cache: {}
only:
- master
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment