Simplify drone config
This commit is contained in:
38
.drone.yml
38
.drone.yml
@@ -10,18 +10,10 @@ trigger:
|
|||||||
- dev
|
- dev
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: restore-cache
|
|
||||||
restore_cache:
|
|
||||||
keys:
|
|
||||||
- npm-{{ .Environment.DRONE_REPO_NAME }}-{{ checksum "package.json" }}
|
|
||||||
- npm-{{ .Environment.DRONE_REPO_NAME }}-
|
|
||||||
|
|
||||||
- name: install
|
- name: install
|
||||||
image: node:18-alpine
|
image: node:18-alpine
|
||||||
commands:
|
commands:
|
||||||
- npm install
|
- npm install
|
||||||
cache_from:
|
|
||||||
- npm-{{ .Environment.DRONE_REPO_NAME }}-{{ checksum "package.json" }}
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: node:18-alpine
|
image: node:18-alpine
|
||||||
@@ -29,7 +21,7 @@ steps:
|
|||||||
- npm run build:h5
|
- npm run build:h5
|
||||||
|
|
||||||
- name: build-image
|
- name: build-image
|
||||||
image: plugins/docker:linux-amd64:linux-amd64
|
image: ccr.ccs.tencentyun.com/violin/docker:linux-amd64
|
||||||
settings:
|
settings:
|
||||||
repo: ccr.ccs.tencentyun.com/violin/todo-frontend
|
repo: ccr.ccs.tencentyun.com/violin/todo-frontend
|
||||||
tags:
|
tags:
|
||||||
@@ -48,15 +40,6 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
KUBECONFIG:
|
KUBECONFIG:
|
||||||
from_secret: kubeconfig
|
from_secret: kubeconfig
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- success
|
|
||||||
|
|
||||||
- name: rebuild-cache
|
|
||||||
rebuild_cache:
|
|
||||||
keys:
|
|
||||||
- npm-{{ .Environment.DRONE_REPO_NAME }}-{{ checksum "package.json" }}
|
|
||||||
- npm-{{ .Environment.DRONE_REPO_NAME }}-
|
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
@@ -71,18 +54,10 @@ trigger:
|
|||||||
- master
|
- master
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: restore-cache
|
|
||||||
restore_cache:
|
|
||||||
keys:
|
|
||||||
- npm-{{ .Environment.DRONE_REPO_NAME }}-{{ checksum "package.json" }}
|
|
||||||
- npm-{{ .Environment.DRONE_REPO_NAME }}-
|
|
||||||
|
|
||||||
- name: install
|
- name: install
|
||||||
image: node:18-alpine
|
image: node:18-alpine
|
||||||
commands:
|
commands:
|
||||||
- npm install
|
- npm install
|
||||||
cache_from:
|
|
||||||
- npm-{{ .Environment.DRONE_REPO_NAME }}-{{ checksum "package.json" }}
|
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: node:18-alpine
|
image: node:18-alpine
|
||||||
@@ -90,7 +65,7 @@ steps:
|
|||||||
- npm run build:h5
|
- npm run build:h5
|
||||||
|
|
||||||
- name: build-image
|
- name: build-image
|
||||||
image: plugins/docker:linux-amd64:linux-amd64
|
image: ccr.ccs.tencentyun.com/violin/docker:linux-amd64
|
||||||
settings:
|
settings:
|
||||||
repo: ccr.ccs.tencentyun.com/violin/todo-frontend
|
repo: ccr.ccs.tencentyun.com/violin/todo-frontend
|
||||||
tags:
|
tags:
|
||||||
@@ -109,12 +84,3 @@ steps:
|
|||||||
environment:
|
environment:
|
||||||
KUBECONFIG:
|
KUBECONFIG:
|
||||||
from_secret: kubeconfig
|
from_secret: kubeconfig
|
||||||
when:
|
|
||||||
status:
|
|
||||||
- success
|
|
||||||
|
|
||||||
- name: rebuild-cache
|
|
||||||
rebuild_cache:
|
|
||||||
keys:
|
|
||||||
- npm-{{ .Environment.DRONE_REPO_NAME }}-{{ checksum "package.json" }}
|
|
||||||
- npm-{{ .Environment.DRONE_REPO_NAME }}-
|
|
||||||
|
|||||||
Reference in New Issue
Block a user