From d98bb4d770302e9a8e93087fb6837dcefc6e17f6 Mon Sep 17 00:00:00 2001 From: cobb Date: Mon, 13 Jun 2022 16:05:45 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E5=AE=98=E6=96=B9=E9=BB=98=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 43 ++++++------------------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/.drone.yml b/.drone.yml index 7184b78..9820cf7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,22 +7,6 @@ platform: arch: amd64 steps: - # 使用缓存进行存储 - - name: restore-cache - image: meltwater/drone-cache - pull: always - settings: - backend: "filesystem" - restore: true - cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' - archive_format: "gzip" - mount: - - pkg.mod - - pkg.build - volumes: - - name: cache - path: /go - # golang 编译 - name: build image: golang:1.17 @@ -36,29 +20,13 @@ steps: commands: - go build -ldflags "-w -s" -o tmp/carp main.go volumes: - - name: cache - path: /go + - name: pkgdeps + path: /drone/src when: event: - push - tag - # 缓存编译 - - name: rebuild-cache - image: meltwater/drone-cache - pull: if-not-exists - settings: - backend: "filesystem" - rebuild: true - cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' - archive_format: "gzip" - mount: - - pkg.mod - - pkg.build - volumes: - - name: cache - path: /go - # 发布,编译镜像并推送到私有镜像仓库 - name: publish image: plugins/docker @@ -130,6 +98,7 @@ steps: when: status: [failure, success] -volumes: - - name: cache - temp: {} \ No newline at end of file +volumes: # 挂载,持久化数据 + - name: pkgdeps + host: + path: /tmp/pkg/repotest \ No newline at end of file