Update common Prometheus files

Signed-off-by: prombot <prometheus-team@googlegroups.com>
This commit is contained in:
prombot 2021-12-10 00:01:58 +00:00
parent 6b01577a8f
commit 607a6e6377
3 changed files with 49 additions and 54 deletions

View File

@ -1,71 +1,64 @@
--- ---
version: 2.1 version: 2.1
orbs: orbs:
prometheus: prometheus/prometheus@0.11.0 prometheus: prometheus/prometheus@0.14.0
executors: executors:
# Whenever the Go version is updated here, .promu.yml should # Whenever the Go version is updated here, .promu.yml should
# also be updated. # also be updated.
golang: golang:
docker: docker:
- image: circleci/golang:1.17 - image: circleci/golang:1.17
jobs: jobs:
test: test:
executor: golang executor: golang
steps: steps:
- prometheus/setup_environment - prometheus/setup_environment
- run: make - run: make
- prometheus/store_artifact: - prometheus/store_artifact:
file: ipmi_exporter file: ipmi_exporter
codespell: codespell:
docker: docker:
- image: circleci/python - image: circleci/python
steps: steps:
- checkout - checkout
- run: sudo pip install codespell - run: sudo pip install codespell
- run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem" -L uint,packages\',uptodate - run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem" -L uint,packages\',uptodate
workflows: workflows:
version: 2 version: 2
ipmi_exporter: ipmi_exporter:
jobs: jobs:
- test: - test:
filters: filters:
tags: tags:
only: /.*/ only: /.*/
- prometheus/build: - prometheus/build:
name: build name: build
filters: filters:
tags: tags:
only: /.*/ only: /.*/
- codespell: - codespell:
filters: filters:
tags: tags:
only: /.*/ only: /.*/
- prometheus/publish_master: - prometheus/publish_master:
context: org-context context: org-context
docker_hub_organization: prometheuscommunity docker_hub_organization: prometheuscommunity
quay_io_organization: prometheuscommunity quay_io_organization: prometheuscommunity
requires: requires:
- test - test
- build - build
filters: filters:
branches: branches:
only: master only: master
- prometheus/publish_release: - prometheus/publish_release:
context: org-context context: org-context
docker_hub_organization: prometheuscommunity docker_hub_organization: prometheuscommunity
quay_io_organization: prometheuscommunity quay_io_organization: prometheuscommunity
requires: requires:
- test - test
- build - build
filters: filters:
tags: tags:
only: /^v.*/ only: /^v.*/
branches: branches:
ignore: /.*/ ignore: /.*/

View File

@ -7,6 +7,7 @@ on:
- "**.go" - "**.go"
- "scripts/errcheck_excludes.txt" - "scripts/errcheck_excludes.txt"
- ".github/workflows/golangci-lint.yml" - ".github/workflows/golangci-lint.yml"
- ".golangci.yml"
pull_request: pull_request:
paths: paths:
- "go.sum" - "go.sum"
@ -14,6 +15,7 @@ on:
- "**.go" - "**.go"
- "scripts/errcheck_excludes.txt" - "scripts/errcheck_excludes.txt"
- ".github/workflows/golangci-lint.yml" - ".github/workflows/golangci-lint.yml"
- ".golangci.yml"
jobs: jobs:
golangci: golangci:

View File

@ -78,7 +78,7 @@ ifneq ($(shell which gotestsum),)
endif endif
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 PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz
GOLANGCI_LINT := GOLANGCI_LINT :=
@ -160,7 +160,7 @@ endif
update-go-deps: update-go-deps:
@echo ">> updating Go dependencies" @echo ">> updating Go dependencies"
@for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \ @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 done
GO111MODULE=$(GO111MODULE) $(GO) mod tidy GO111MODULE=$(GO111MODULE) $(GO) mod tidy
ifneq (,$(wildcard vendor)) ifneq (,$(wildcard vendor))