#persist gomodcache between CI runs
21 messages · Page 1 of 1 (latest)
it'll depend on which image you're using
It was a test run for golangci-lint, nothing else
Let me get the yml file real quick
when:
- event: push
branch: "**"
steps:
- name: lint
image: golangci/golangci-lint:v2.0.2
commands:
- golangci-lint run -v
ty, 'll give it a go
if you're using the golang image to compile as well, you should be able to use the same path there too
you can compare with the github actions, I think the directories are configurable (like for go itself people change the gopath so it gets cached)
yeah, I am slowly caching things in the pipeline. it's quite annoying that the woodpecker container has absolutely no coreutils in it though
my slow brain eventually figured out I could copy busybox over and use that to get a shell
@hearty cypress @rose geyser after much work I managed to make this monster of a CI pipeline work
well, it's a pretty standard pipeline but the code generation and caching the tooling was an annoyance
grats. what’s ur cache key?
if you mean how I invalidate this stuff, I haven't even started to think how... right now I just run a cron that wipes the cache directory every so often
may just do a checksum based on go.mod and go.sum and invalidate everything based on if it changes
can you have more than 1 build in flight? (is the cache some s3 bucket or shared somehow or just local to runner)
local to the runner, we have a single runner setup, so the cache is never shared
sorry, I lied. it's not local to the runner
but we only have 1 runner