Update build
* Update Go to 1.20 * Update golangci-lint. * Update CI orb. * Fix staticcheck issue in perf collector. Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
parent
2f20a9bb3c
commit
3691cb9faf
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
version: 2.1
|
||||
orbs:
|
||||
prometheus: prometheus/prometheus@0.16.0
|
||||
prometheus: prometheus/prometheus@0.17.1
|
||||
executors:
|
||||
# Whenever the Go version is updated here, .promu.yml and .promu-cgo.yml
|
||||
# should also be updated.
|
||||
golang:
|
||||
docker:
|
||||
- image: cimg/go:1.19
|
||||
- image: cimg/go:1.20
|
||||
arm:
|
||||
machine:
|
||||
image: ubuntu-2004:current
|
||||
|
|
|
@ -18,13 +18,13 @@ jobs:
|
|||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: install Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.18.x
|
||||
go-version: 1.20.x
|
||||
- name: Install snmp_exporter/generator dependencies
|
||||
run: sudo apt-get update && sudo apt-get -y install libsnmp-dev
|
||||
if: github.repository == 'prometheus/snmp_exporter'
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@v3.2.0
|
||||
uses: golangci/golangci-lint-action@v3.4.0
|
||||
with:
|
||||
version: v1.45.2
|
||||
version: v1.51.2
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
go:
|
||||
# Whenever the Go version is updated here, .circle/config.yml and
|
||||
# .promu.yml should also be updated.
|
||||
version: 1.19
|
||||
version: 1.20
|
||||
cgo: true
|
||||
repository:
|
||||
path: github.com/prometheus/node_exporter
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
go:
|
||||
# Whenever the Go version is updated here, .circle/config.yml and
|
||||
# .promu-cgo.yml should also be updated.
|
||||
version: 1.19
|
||||
version: 1.20
|
||||
repository:
|
||||
path: github.com/prometheus/node_exporter
|
||||
build:
|
||||
|
|
|
@ -707,9 +707,6 @@ func (c *perfCollector) updateHardwareStats(ch chan<- prometheus.Metric) error {
|
|||
if err := (*profiler).Profile(hwProfile); err != nil {
|
||||
return err
|
||||
}
|
||||
if hwProfile == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
cpuid := strconv.Itoa(c.hwProfilerCPUMap[profiler])
|
||||
|
||||
|
@ -795,9 +792,6 @@ func (c *perfCollector) updateSoftwareStats(ch chan<- prometheus.Metric) error {
|
|||
if err := (*profiler).Profile(swProfile); err != nil {
|
||||
return err
|
||||
}
|
||||
if swProfile == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
cpuid := strconv.Itoa(c.swProfilerCPUMap[profiler])
|
||||
|
||||
|
@ -851,9 +845,6 @@ func (c *perfCollector) updateCacheStats(ch chan<- prometheus.Metric) error {
|
|||
if err := (*profiler).Profile(cacheProfile); err != nil {
|
||||
return err
|
||||
}
|
||||
if cacheProfile == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
cpuid := strconv.Itoa(c.cacheProfilerCPUMap[profiler])
|
||||
|
||||
|
|
Loading…
Reference in New Issue