diff --git a/.circleci/config.yml b/.circleci/config.yml index b06ffb4..c193509 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,71 +1,64 @@ --- version: 2.1 - orbs: - prometheus: prometheus/prometheus@0.11.0 - + prometheus: prometheus/prometheus@0.14.0 executors: # Whenever the Go version is updated here, .promu.yml should # also be updated. golang: docker: - - image: circleci/golang:1.17 - + - image: circleci/golang:1.17 jobs: test: executor: golang - steps: - - prometheus/setup_environment - - run: make - - prometheus/store_artifact: - file: ipmi_exporter - + - prometheus/setup_environment + - run: make + - prometheus/store_artifact: + file: ipmi_exporter codespell: docker: - - image: circleci/python - + - image: circleci/python steps: - - checkout - - run: sudo pip install codespell - - run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem" -L uint,packages\',uptodate - + - checkout + - run: sudo pip install codespell + - run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem" -L uint,packages\',uptodate workflows: version: 2 ipmi_exporter: jobs: - - test: - filters: - tags: - only: /.*/ - - prometheus/build: - name: build - filters: - tags: - only: /.*/ - - codespell: - filters: - tags: - only: /.*/ - - prometheus/publish_master: - context: org-context - docker_hub_organization: prometheuscommunity - quay_io_organization: prometheuscommunity - requires: - - test - - build - filters: - branches: - only: master - - prometheus/publish_release: - context: org-context - docker_hub_organization: prometheuscommunity - quay_io_organization: prometheuscommunity - requires: - - test - - build - filters: - tags: - only: /^v.*/ - branches: - ignore: /.*/ + - test: + filters: + tags: + only: /.*/ + - prometheus/build: + name: build + filters: + tags: + only: /.*/ + - codespell: + filters: + tags: + only: /.*/ + - prometheus/publish_master: + context: org-context + docker_hub_organization: prometheuscommunity + quay_io_organization: prometheuscommunity + requires: + - test + - build + filters: + branches: + only: master + - prometheus/publish_release: + context: org-context + docker_hub_organization: prometheuscommunity + quay_io_organization: prometheuscommunity + requires: + - test + - build + filters: + tags: + only: /^v.*/ + branches: + ignore: /.*/ diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 431fef7..f96c76a 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -7,6 +7,7 @@ on: - "**.go" - "scripts/errcheck_excludes.txt" - ".github/workflows/golangci-lint.yml" + - ".golangci.yml" pull_request: paths: - "go.sum" @@ -14,6 +15,7 @@ on: - "**.go" - "scripts/errcheck_excludes.txt" - ".github/workflows/golangci-lint.yml" + - ".golangci.yml" jobs: golangci: diff --git a/Makefile.common b/Makefile.common index 99e8f9f..bf7304e 100644 --- a/Makefile.common +++ b/Makefile.common @@ -78,7 +78,7 @@ ifneq ($(shell which gotestsum),) endif endif -PROMU_VERSION ?= 0.12.0 +PROMU_VERSION ?= 0.13.0 PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz GOLANGCI_LINT := @@ -160,7 +160,7 @@ endif update-go-deps: @echo ">> updating Go dependencies" @for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \ - $(GO) get $$m; \ + $(GO) get -d $$m; \ done GO111MODULE=$(GO111MODULE) $(GO) mod tidy ifneq (,$(wildcard vendor))