This commit is contained in:
33
.drone.yml
33
.drone.yml
@ -20,7 +20,31 @@ steps: # 定义管道的执行步骤
|
||||
tags:
|
||||
- latest
|
||||
|
||||
- name: loading cache # 加载缓存
|
||||
pull: if-not-exists # 如果镜像不存在则拉取,免去每次都要重新下载
|
||||
image: drillster/drone-volume-cache
|
||||
volumes:
|
||||
- name: cache
|
||||
path: /cache
|
||||
settings:
|
||||
restore: true
|
||||
mount:
|
||||
- ./nugetpackages
|
||||
|
||||
- name: test
|
||||
image: node
|
||||
volumes:
|
||||
- name: npm-cache
|
||||
path: /drone/src/node_modules
|
||||
commands:
|
||||
- mkdir -p ./node_modules
|
||||
- export NODE_MODULES_PATH=`pwd`/node_modules
|
||||
- npm config set registry https://registry.npm.taobao.org
|
||||
- npm i
|
||||
- echo $NODE_MODULES_PATH
|
||||
|
||||
- name: build-image
|
||||
pull: if-not-exists # 如果镜像不存在则拉取,免去每次都要重新下载
|
||||
image: plugins/docker
|
||||
depends_on: [build-tags]
|
||||
settings:
|
||||
@ -67,3 +91,12 @@ steps:
|
||||
- docker run -d -p 16808:8080 --name=mol-robot_${DRONE_BUILD_NUMBER} --env-file /mnt/data/opt/mol-robot/.env git.liliyamol.cn:8081/mol/mol-robot:latest
|
||||
- docker rmi $(docker images | grep "none" | awk '{print $3}')
|
||||
- echo ==-----==部署成功==-----==
|
||||
|
||||
# 挂载本地磁盘路径
|
||||
volumes:
|
||||
- name: cache
|
||||
host:
|
||||
path: /tmp/drone-docker-cache
|
||||
- name: npm-cache
|
||||
host:
|
||||
path: /var/lib/npm/cache
|
@ -41,6 +41,7 @@ function cookInit() {
|
||||
}
|
||||
|
||||
function dealCommon(data) {
|
||||
logger('开始处理指令')
|
||||
logger(data)
|
||||
const [commandText, ...contentText] = data.text.trim().split(' ');
|
||||
for (let com of cookCommand.keys()) {
|
||||
@ -55,4 +56,5 @@ export default function install(bot, queue) {
|
||||
Bot = bot;
|
||||
Queue = queue;
|
||||
cookInit();
|
||||
logger('cook 插件加载成功')
|
||||
}
|
||||
|
Reference in New Issue
Block a user