Skip to content

Commit d2f6146

Browse files
authored
chore: update golang and dependencies (#62)
1 parent f684182 commit d2f6146

File tree

10 files changed

+53
-976
lines changed

10 files changed

+53
-976
lines changed

.github/workflows/prerelease.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
env:
1111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12-
GO_VERSION: '1.16'
12+
GO_VERSION: '1.18'
1313
INTEGRATION: "consul"
1414
ORIGINAL_REPO_NAME: 'newrelic/nri-consul'
1515
REPO_FULL_NAME: ${{ github.event.repository.full_name }}
@@ -197,4 +197,4 @@ jobs:
197197
integration: nri-${{ env.INTEGRATION }}
198198
packageLocation: repo
199199
stagingRepo: true
200-
upgrade: false
200+
upgrade: false

.github/workflows/push_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
TAG: "v0.0.0" # needed for goreleaser windows builds
1212
REPO_FULL_NAME: ${{ github.event.repository.full_name }}
1313
ORIGINAL_REPO_NAME: "newrelic/nri-consul"
14-
GO_VERSION: '1.16'
14+
GO_VERSION: '1.18'
1515
DOCKER_LOGIN_AVAILABLE: ${{ secrets.OHAI_DOCKER_HUB_ID }}
1616

1717
jobs:

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## 2.5.1 (2022-06-27)
9+
### Changed
10+
- Bump dependencies
11+
12+
### Added
13+
Added support for more distributions:
14+
- RHEL(EL) 9
15+
- Ubuntu 22.04
16+
817
## 2.5.0 (2022-05-18)
918
### Added
1019
Added TIMEOUT for the client.

Makefile

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,18 @@ NATIVEOS := $(shell go version | awk -F '[ /]' '{print $$4}')
33
NATIVEARCH := $(shell go version | awk -F '[ /]' '{print $$5}')
44
INTEGRATION := consul
55
BINARY_NAME = nri-$(INTEGRATION)
6-
GO_PKGS := $(shell go list ./... | grep -v "/vendor/")
76
GO_FILES := ./src/
87
GOFLAGS = -mod=readonly
9-
GOLANGCI_LINT = github.com/golangci/golangci-lint/cmd/golangci-lint
108

119

1210
all: build
1311

14-
build: clean validate test compile integration-test
12+
build: clean test compile integration-test
1513

1614
clean:
1715
@echo "=== $(INTEGRATION) === [ clean ]: Removing binaries and coverage file..."
1816
@rm -rfv bin coverage.xml
1917

20-
validate:
21-
@printf "=== $(INTEGRATION) === [ validate ]: running golangci-lint & semgrep... "
22-
@go run $(GOFLAGS) $(GOLANGCI_LINT) run --verbose
23-
@[ -f .semgrep.yml ] && semgrep_config=".semgrep.yml" || semgrep_config="p/golang" ; \
24-
docker run --rm -v "${PWD}:/src:ro" --workdir /src returntocorp/semgrep -c "$$semgrep_config"
25-
2618
compile:
2719
@echo "=== $(INTEGRATION) === [ compile ]: Building $(BINARY_NAME)..."
2820
@go build -o bin/$(BINARY_NAME) $(GO_FILES)
@@ -40,4 +32,4 @@ include $(CURDIR)/build/ci.mk
4032
include $(CURDIR)/build/release.mk
4133

4234

43-
.PHONY: all build clean validate compile test
35+
.PHONY: all build clean compile test

build/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.16-buster
1+
FROM golang:1.18-buster
22

33
ARG GH_VERSION='1.6.0'
44

build/ci.mk

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ ci/debug-container: ci/deps
1919
-e GPG_PRIVATE_KEY_BASE64 \
2020
$(BUILDER_TAG) bash
2121

22-
.PHONY : ci/validate
23-
ci/validate: ci/deps
24-
@docker run --rm -t \
25-
--name "nri-$(INTEGRATION)-validate" \
26-
-v $(CURDIR):/go/src/github.com/newrelic/nri-$(INTEGRATION) \
27-
-w /go/src/github.com/newrelic/nri-$(INTEGRATION) \
28-
$(BUILDER_TAG) make validate
29-
3022
.PHONY : ci/test
3123
ci/test: ci/deps
3224
@docker run --rm -t \
@@ -80,4 +72,4 @@ ifdef TAG
8072
else
8173
@echo "===> $(INTEGRATION) === [ci/prerelease] TAG env variable expected to be set"
8274
exit 1
83-
endif
75+
endif

go.mod

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,43 @@
11
module github.com/newrelic/nri-consul
22

3-
go 1.16
3+
go 1.18
44

55
require (
6-
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 // indirect
7-
github.com/golangci/golangci-lint v1.40.0
86
github.com/hashicorp/consul/api v1.4.0
97
github.com/hashicorp/go-cleanhttp v0.5.1
8+
github.com/hashicorp/serf v0.9.1
9+
github.com/newrelic/infra-integrations-sdk v3.7.3+incompatible
10+
github.com/stretchr/testify v1.7.5
11+
github.com/xeipuuv/gojsonschema v1.2.0
12+
)
13+
14+
require (
15+
github.com/armon/go-metrics v0.0.0-20190430140413-ec5e00d3c878 // indirect
16+
github.com/davecgh/go-spew v1.1.1 // indirect
17+
github.com/fatih/color v1.10.0 // indirect
18+
github.com/google/btree v1.0.0 // indirect
1019
github.com/hashicorp/go-hclog v0.12.2 // indirect
1120
github.com/hashicorp/go-immutable-radix v1.1.0 // indirect
1221
github.com/hashicorp/go-msgpack v0.5.5 // indirect
22+
github.com/hashicorp/go-multierror v1.1.1 // indirect
1323
github.com/hashicorp/go-rootcerts v1.0.3-0.20191216101743-c8a9a31cbd76 // indirect
1424
github.com/hashicorp/go-sockaddr v1.0.2 // indirect
15-
github.com/hashicorp/serf v0.9.1
25+
github.com/hashicorp/golang-lru v0.5.4 // indirect
26+
github.com/kr/text v0.2.0 // indirect
27+
github.com/mattn/go-colorable v0.1.8 // indirect
1628
github.com/mattn/go-isatty v0.0.13-0.20200128103942-cb30d6282491 // indirect
29+
github.com/miekg/dns v1.1.35 // indirect
30+
github.com/mitchellh/go-homedir v1.1.0 // indirect
1731
github.com/mitchellh/go-testing-interface v1.14.0 // indirect
1832
github.com/mitchellh/mapstructure v1.2.3 // indirect
19-
github.com/newrelic/infra-integrations-sdk v3.6.7+incompatible
20-
github.com/stretchr/testify v1.7.0
21-
github.com/xeipuuv/gojsonschema v1.2.0
33+
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
34+
github.com/pkg/errors v0.9.1 // indirect
35+
github.com/pmezard/go-difflib v1.0.0 // indirect
36+
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
37+
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
38+
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 // indirect
39+
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect
40+
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57 // indirect
41+
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
42+
gopkg.in/yaml.v3 v3.0.1 // indirect
2243
)

0 commit comments

Comments
 (0)