-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore: CI: Bump grafana-plugin-ci image to 1.9.5 #780
Conversation
- apt update | ||
- apt install -y gcc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go test -race
requires CGO and a C compiler installed:
root@df30cca174ec:/src# mage -v testRace
Running target: TestRace
exec: go "test" "-race" "./..."
go: -race requires cgo; enable cgo by setting CGO_ENABLED=1
root@df30cca174ec:/src# CGO_ENABLED=1 mage -v testRace
Running target: TestRace
exec: go "test" "-race" "./..."
go: downloading github.com/mitchellh/reflectwalk v1.0.2
# runtime/cgo
cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in $PATH
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Long term I say we should probably stop using those images and use the Go image + mage, and golangci-images, similar to what we do for example in the plugin runner:
https://github.com/grafana/grafana-plugin-runner/blob/main/.drone.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird that it requires CGO. Was this in CI or for you locally?
Long term I say we should probably stop using those images and use the Go image + mage, and golangci-images
Yeah sounds like a good idea 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird that it requires CGO. Was this in CI or for you locally?
Both locally and CI. Unfortunately it's a requirement: https://go.dev/doc/articles/race_detector#Requirements
I wasn't aware of this either before today 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Hopefully things evolve eventually golang/go#9918 (comment)
@@ -44,22 +49,27 @@ trigger: | |||
|
|||
steps: | |||
- name: build | |||
image: grafana/grafana-plugin-ci:1.8.1-alpine | |||
image: grafana/grafana-plugin-ci:1.9.5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since 1.9.0
, we stopped building alpine-based images. Only debian-based ones are available:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What this PR does / why we need it:
Bumps the image used to run CI steps. Brings the following changes:
golangci-lint
is usedPreviously, we used Alpine-based images. Since
1.9.0
of the image, we stopped building them:https://hub.docker.com/r/grafana/grafana-plugin-ci/tags
So we are using Debian-based images now.
go test -race
requires CGO and a C compiler, for this reason we have to install gcc and enable CGO in the test step.Long term I say we should probably stop using those
grafana-plugin-ci
images and use the Go image + mage, and golangci-lint separately, similar to what we do for example in the plugin runner:https://github.com/grafana/grafana-plugin-runner/blob/main/.drone.yml
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: