-
Notifications
You must be signed in to change notification settings - Fork 763
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add standard Prometheus build setup * CircleCI config * Makefile * Go modules * Golang-CI Lint * promu config * Remove /vendor * Remove mage build * Update READMEs #478 Signed-off-by: Ben Kochie <[email protected]>
- Loading branch information
Showing
1,455 changed files
with
684 additions
and
529,255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--- | ||
version: 2.1 | ||
|
||
orbs: | ||
prometheus: prometheus/[email protected] | ||
|
||
executors: | ||
# This must match .promu.yml. | ||
golang: | ||
docker: | ||
- image: circleci/golang:1.15 | ||
|
||
jobs: | ||
test: | ||
executor: golang | ||
|
||
steps: | ||
- prometheus/setup_environment | ||
- run: make | ||
- prometheus/store_artifact: | ||
file: postgres_exporter | ||
|
||
workflows: | ||
version: 2 | ||
postgres_exporter: | ||
jobs: | ||
- test: | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- prometheus/build: | ||
name: build | ||
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: /.*/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ | |
/.metrics.*.added | ||
/.metrics.*.removed | ||
/tools/src | ||
/vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
issues: | ||
exclude-rules: | ||
- path: _test.go | ||
linters: | ||
- errcheck | ||
|
||
linters-settings: | ||
errcheck: | ||
exclude: scripts/errcheck_excludes.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
go: | ||
# This must match .circle/config.yml. | ||
version: 1.15 | ||
repository: | ||
path: github.com/prometheus-community/postgres_exporter | ||
build: | ||
binaries: | ||
- name: postgres_exporter | ||
path: ./cmd/postgres_exporter | ||
flags: -a -tags 'netgo static_build' | ||
ldflags: | | ||
-X github.com/prometheus/common/version.Version={{.Version}} | ||
-X github.com/prometheus/common/version.Revision={{.Revision}} | ||
-X github.com/prometheus/common/version.Branch={{.Branch}} | ||
-X github.com/prometheus/common/version.BuildUser={{user}}@{{host}} | ||
-X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}} | ||
tarball: | ||
files: | ||
- LICENSE |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
FROM debian:10-slim | ||
RUN useradd -u 20001 postgres_exporter | ||
|
||
USER postgres_exporter | ||
|
||
ARG binary | ||
|
||
COPY $binary /postgres_exporter | ||
|
||
EXPOSE 9187 | ||
|
||
ENTRYPOINT [ "/postgres_exporter" ] | ||
ARG ARCH="amd64" | ||
ARG OS="linux" | ||
FROM quay.io/prometheus/busybox-${OS}-${ARCH}:latest | ||
LABEL maintainer="The Prometheus Authors <[email protected]>" | ||
|
||
ARG ARCH="amd64" | ||
ARG OS="linux" | ||
COPY .build/${OS}-${ARCH}/postgres_exporter /bin/postgres_exporter | ||
|
||
EXPOSE 9187 | ||
USER nobody | ||
ENTRYPOINT [ "/bin/postgres_exporter" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Ensure that 'all' is the default target otherwise it will be the first target from Makefile.common. | ||
all:: | ||
|
||
# Needs to be defined before including Makefile.common to auto-generate targets | ||
DOCKER_ARCHS ?= amd64 armv7 arm64 ppc64le | ||
DOCKER_REPO ?= prometheuscommunity | ||
|
||
include Makefile.common | ||
|
||
DOCKER_IMAGE_NAME ?= postgres-exporter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.