ci(drone): 添加 Go 模块和构建缓存
- 在 restore cache 和 rebuild cache 步骤中添加了 go-mod-cache 和 go
This commit is contained in:
@@ -33,6 +33,14 @@ steps:
|
|||||||
- ls -lR /opt/drone/cache/go-mod || echo "/opt/drone/cache/go-mod not found"
|
- ls -lR /opt/drone/cache/go-mod || echo "/opt/drone/cache/go-mod not found"
|
||||||
- echo "==== After build, /opt/drone/cache/go-build ===="
|
- echo "==== After build, /opt/drone/cache/go-build ===="
|
||||||
- ls -lR /opt/drone/cache/go-build || echo "/opt/drone/cache/go-build not found"
|
- ls -lR /opt/drone/cache/go-build || echo "/opt/drone/cache/go-build not found"
|
||||||
|
- echo "==== Whoami and permissions ===="
|
||||||
|
- whoami
|
||||||
|
- id
|
||||||
|
- ls -ld /opt/drone/cache/go-mod
|
||||||
|
- ls -ld /opt/drone/cache/go-build
|
||||||
|
- go env GOMODCACHE
|
||||||
|
- go env GOCACHE
|
||||||
|
- touch /opt/drone/cache/go-mod/testfile_from_build
|
||||||
|
|
||||||
- name: rebuild cache
|
- name: rebuild cache
|
||||||
image: drillster/drone-volume-cache
|
image: drillster/drone-volume-cache
|
||||||
|
|||||||
Reference in New Issue
Block a user