Simplify drone config

This commit is contained in:
Agent
2026-03-20 16:25:25 +00:00
parent 09377de909
commit 4d20d3e24d

View File

@@ -10,18 +10,10 @@ trigger:
- dev
steps:
- name: restore-cache
restore_cache:
keys:
- npm-{{ .Environment.DRONE_REPO_NAME }}-{{ checksum "package.json" }}
- npm-{{ .Environment.DRONE_REPO_NAME }}-
- name: install
image: node:18-alpine
commands:
- npm install
cache_from:
- npm-{{ .Environment.DRONE_REPO_NAME }}-{{ checksum "package.json" }}
- name: build
image: node:18-alpine
@@ -29,7 +21,7 @@ steps:
- npm run build:h5
- name: build-image
image: plugins/docker:linux-amd64:linux-amd64
image: ccr.ccs.tencentyun.com/violin/docker:linux-amd64
settings:
repo: ccr.ccs.tencentyun.com/violin/todo-frontend
tags:
@@ -48,15 +40,6 @@ steps:
environment:
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
@@ -71,18 +54,10 @@ trigger:
- master
steps:
- name: restore-cache
restore_cache:
keys:
- npm-{{ .Environment.DRONE_REPO_NAME }}-{{ checksum "package.json" }}
- npm-{{ .Environment.DRONE_REPO_NAME }}-
- name: install
image: node:18-alpine
commands:
- npm install
cache_from:
- npm-{{ .Environment.DRONE_REPO_NAME }}-{{ checksum "package.json" }}
- name: build
image: node:18-alpine
@@ -90,7 +65,7 @@ steps:
- npm run build:h5
- name: build-image
image: plugins/docker:linux-amd64:linux-amd64
image: ccr.ccs.tencentyun.com/violin/docker:linux-amd64
settings:
repo: ccr.ccs.tencentyun.com/violin/todo-frontend
tags:
@@ -109,12 +84,3 @@ steps:
environment:
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 }}-