提交 b41d7372 作者: 闫冬杰

更新 .gitlab-ci.yml

上级 0308d4cb
流水线 #2016 已失败 于阶段
in 1 分 45 秒
variables: variables:
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
cache: # cache:
key: "$CI_COMMIT_REF_NAME" # key: "$CI_COMMIT_REF_NAME"
paths: # paths:
- node_modules # - node_modules
stages: stages:
- compile - compile
- build - build
...@@ -13,12 +13,15 @@ compile: ...@@ -13,12 +13,15 @@ compile:
image: node:9 image: node:9
script: script:
- npm config set registry https://registry.npm.taobao.org - npm config set registry https://registry.npm.taobao.org
- npm install - npm install --unsafe-perm
- npm run build - npm run build:prod
artifacts: artifacts:
expire_in: 15 mins expire_in: 15 mins
paths: paths:
- dist - dist
cache:
paths:
- node_modules
build: build:
stage: build stage: build
image: docker:dind image: docker:dind
...@@ -34,6 +37,5 @@ deploy: ...@@ -34,6 +37,5 @@ deploy:
image: $CI_REGISTRY_URL/library/rancher-gitlab-deploy image: $CI_REGISTRY_URL/library/rancher-gitlab-deploy
script: script:
- upgrade --environment sl-prod --stack slweb --service lanzhou-transportation --new-image $CI_REGISTRY_URL/platform/lanzhou-transportation:1.0 --finish-upgrade - upgrade --environment sl-prod --stack slweb --service lanzhou-transportation --new-image $CI_REGISTRY_URL/platform/lanzhou-transportation:1.0 --finish-upgrade
# - upgrade --environment dev --stack slweb --service lanzhou-transportation --new-image $CI_REGISTRY_URL/platform/lanzhou-transportation --finish-upgrade
only: only:
- master - master
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论