Skip to content

Commit

Permalink
Update dependencies and release (#88)
Browse files Browse the repository at this point in the history
* Update dependencies and release

* Fix Changelog
  • Loading branch information
carlossscastro committed Jul 5, 2022
1 parent a2fbc8f commit debba83
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 1,075 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO_VERSION: '1.16'
GO_VERSION: '1.18'
INTEGRATION: "postgresql"
ORIGINAL_REPO_NAME: 'newrelic/nri-postgresql'
REPO_FULL_NAME: ${{ github.event.repository.full_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
TAG: "v0.0.0" # needed for goreleaser windows builds
REPO_FULL_NAME: ${{ github.event.repository.full_name }}
ORIGINAL_REPO_NAME: "newrelic/nri-postgresql"
GO_VERSION: '1.16'
GO_VERSION: '1.18'
DOCKER_LOGIN_AVAILABLE: ${{ secrets.OHAI_DOCKER_HUB_ID }}

jobs:
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 2.10.4 (2022-07-05)
### Changed
- Update Go to v1.18
- Bump dependencies
### Added
Added support for more distributions:
- RHEL(EL) 9
- Ubuntu 22.04

## 2.10.3 (2022-05-25)
### Changed
- Updated the custom query file for Postgres 13
- fix(ci/cd): removing snyk unused step
### Added
- add_postgresql_logs_example_yml

## 2.10.2 (2022-03-10)
### Changed
- Updated the custom query sample file `pg_stat_statements` query, disabling it by default.
Expand Down
16 changes: 0 additions & 16 deletions Dockerfile

This file was deleted.

13 changes: 2 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ BINARY_NAME = nri-$(INTEGRATION)
INTEGRATIONS_DIR = /var/db/newrelic-infra/newrelic-integrations/
CONFIG_DIR = /etc/newrelic-infra/integrations.d
GO_FILES := ./src/
GOLANGCI_LINT = github.com/golangci/golangci-lint/cmd/golangci-lint

all: build

build: clean validate test compile
build: clean test compile

build-container:
docker build -t nri-postgresql .
Expand All @@ -20,14 +19,6 @@ clean:
@echo "=== $(INTEGRATION) === [ clean ]: Removing binaries and coverage file..."
@rm -rfv bin coverage.xml

validate:
@printf "=== $(INTEGRATION) === [ validate ]: running golangci-lint & semgrep... "
@go run $(GOFLAGS) $(GOLANGCI_LINT) run --verbose
@[ -f .semgrep.yml ] && semgrep_config=".semgrep.yml" || semgrep_config="p/golang" ; \
docker run --rm -v "${PWD}:/src:ro" --workdir /src returntocorp/semgrep -c "$$semgrep_config"



compile:
@echo "=== $(INTEGRATION) === [ compile ]: Building $(BINARY_NAME)..."
@go build -o bin/$(BINARY_NAME) $(GO_FILES)
Expand All @@ -52,4 +43,4 @@ install: compile
include $(CURDIR)/build/ci.mk
include $(CURDIR)/build/release.mk

.PHONY: all build clean validate compile test integration-test install
.PHONY: all build clean compile test integration-test install
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16-buster
FROM golang:1.18-buster

ARG GH_VERSION='1.9.2'

Expand Down
8 changes: 0 additions & 8 deletions build/ci.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ ci/debug-container: ci/deps
-e GPG_PRIVATE_KEY_BASE64 \
$(BUILDER_TAG) bash

.PHONY : ci/validate
ci/validate: ci/deps
@docker run --rm -t \
--name "nri-$(INTEGRATION)-validate" \
-v $(CURDIR):/go/src/github.com/newrelic/nri-$(INTEGRATION) \
-w /go/src/github.com/newrelic/nri-$(INTEGRATION) \
$(BUILDER_TAG) make validate

.PHONY : ci/test
ci/test: ci/deps
@docker run --rm -t \
Expand Down
28 changes: 18 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
module github.com/newrelic/nri-postgresql

go 1.16
go 1.18

require (
github.com/blang/semver/v4 v4.0.0
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/golangci/golangci-lint v1.39.0
github.com/jmoiron/sqlx v1.2.0
github.com/josephspurrier/goversioninfo v1.2.0
github.com/lib/pq v1.9.0
github.com/mattn/go-sqlite3 v1.14.7 // indirect
github.com/newrelic/infra-integrations-sdk v3.6.7+incompatible
github.com/stretchr/objx v0.1.2-0.20180626195558-9e1dfc121bca // indirect
github.com/stretchr/testify v1.7.0
github.com/newrelic/infra-integrations-sdk v3.7.3+incompatible
github.com/stretchr/testify v1.8.0
github.com/xeipuuv/gojsonschema v1.2.0
golang.org/x/tools v0.1.0
gopkg.in/DATA-DOG/go-sqlmock.v1 v1.3.0
gopkg.in/yaml.v2 v2.4.0
mvdan.cc/gofumpt v0.1.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mattn/go-sqlite3 v1.14.7 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.4.0 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

0 comments on commit debba83

Please sign in to comment.