From 5103221459c0f6c76f587e6bf8be91cd663f24e9 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 9 Apr 2021 22:01:07 +0800 Subject: [PATCH] Fix drone --- .drone.yml | 72 ++++++++++++++++++++++++++++++------------------------ Makefile | 1 - 2 files changed, 40 insertions(+), 33 deletions(-) diff --git a/.drone.yml b/.drone.yml index 9af8ebf4..f760cf1c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -69,8 +69,9 @@ steps: settings: backend: "filesystem" restore: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -100,8 +101,9 @@ steps: settings: backend: "filesystem" rebuild: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -111,8 +113,7 @@ steps: volumes: - name: cache - host: - path: /var/lib/cache + temp: {} --- kind: pipeline @@ -126,8 +127,9 @@ steps: settings: backend: "filesystem" restore: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -209,8 +211,9 @@ steps: settings: backend: "filesystem" rebuild: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -220,8 +223,7 @@ steps: volumes: - name: cache - host: - path: /var/lib/cache + temp: {} services: - name: mysql @@ -243,8 +245,9 @@ steps: settings: backend: "filesystem" restore: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -279,8 +282,9 @@ steps: settings: backend: "filesystem" rebuild: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -290,8 +294,7 @@ steps: volumes: - name: cache - host: - path: /var/lib/cache + temp: {} services: - name: mysql8 @@ -313,8 +316,9 @@ steps: settings: backend: "filesystem" restore: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -349,8 +353,9 @@ steps: settings: backend: "filesystem" rebuild: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -360,8 +365,7 @@ steps: volumes: - name: cache - host: - path: /var/lib/cache + temp: {} services: - name: mariadb @@ -383,8 +387,9 @@ steps: settings: backend: "filesystem" restore: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -443,8 +448,9 @@ steps: settings: backend: "filesystem" rebuild: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -454,8 +460,7 @@ steps: volumes: - name: cache - host: - path: /var/lib/cache + temp: {} services: - name: pgsql @@ -478,8 +483,9 @@ steps: settings: backend: "filesystem" restore: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -515,8 +521,9 @@ steps: settings: backend: "filesystem" rebuild: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -526,8 +533,7 @@ steps: volumes: - name: cache - host: - path: /var/lib/cache + temp: {} services: - name: mssql @@ -550,8 +556,9 @@ steps: settings: backend: "filesystem" restore: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -586,8 +593,9 @@ steps: settings: backend: "filesystem" rebuild: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -597,8 +605,7 @@ steps: volumes: - name: cache - host: - path: /var/lib/cache + temp: {} services: - name: tidb @@ -617,8 +624,9 @@ steps: settings: backend: "filesystem" restore: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -653,8 +661,9 @@ steps: settings: backend: "filesystem" rebuild: true - cache_key: "volume" + cache_key: '{{ .Repo.Name }}_{{ checksum "go.mod" }}_{{ checksum "go.sum" }}_{{ arch }}_{{ os }}' archive_format: "gzip" + filesystem_cache_root: "/go" mount: - pkg.mod - pkg.build @@ -664,8 +673,7 @@ steps: volumes: - name: cache - host: - path: /var/lib/cache + temp: {} services: - name: cockroach diff --git a/Makefile b/Makefile index a2ab275e..7305baa7 100644 --- a/Makefile +++ b/Makefile @@ -72,7 +72,6 @@ fmt: .PHONY: fmt-check fmt-check: # get all go files and run go fmt on them - echo $(GOFILES) @diff=$$($(GOFMT) -d $(GOFILES)); \ if [ -n "$$diff" ]; then \ echo "Please run 'make fmt' and commit the result:"; \