Skip to content

Commit 6ca6497

Browse files
committed
point to tetrate, tweak ci, custom job
1 parent 320b684 commit 6ca6497

File tree

3 files changed

+54
-17
lines changed

3 files changed

+54
-17
lines changed

.circleci/config.yml

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,23 @@ jobs:
4545
- run: make build
4646
- run: make test
4747

48+
# Customized prometheus/publish_master to use our docker variables.
49+
# See:
50+
# - https://circleci.com/developer/orbs/orb/prometheus/prometheus
51+
# - https://github.com/prometheus/circleci
52+
53+
publish_images:
54+
docker:
55+
- image: cimg/go:1.24
56+
steps:
57+
- prometheus/setup_build_environment:
58+
docker_version: ""
59+
- prometheus/publish_images:
60+
registry: docker.io
61+
organization: tetrate
62+
login_variable: DOCKER_USER
63+
password_variable: DOCKER_PASS
64+
4865
workflows:
4966
version: 2
5067
postgres_exporter:
@@ -81,25 +98,36 @@ workflows:
8198
only: /^(main|master|release-.*|.*build-all.*)$/
8299
tags:
83100
only: /^v.*/
84-
- prometheus/publish_master:
85-
context: org-context
86-
docker_hub_organization: prometheuscommunity
87-
quay_io_organization: prometheuscommunity
88-
requires:
89-
- test
90-
- build_all
91-
filters:
92-
branches:
93-
only: master
94-
- prometheus/publish_release:
95-
context: org-context
96-
docker_hub_organization: prometheuscommunity
97-
quay_io_organization: prometheuscommunity
101+
# Build and publish images to the tetrate container image registry.
102+
- publish_images:
103+
context: org-global
98104
requires:
99-
- test
100-
- build_all
105+
- test
106+
- build_all
101107
filters:
102108
tags:
103109
only: /^v.*/
104110
branches:
105111
ignore: /.*/
112+
# - prometheus/publish_master:
113+
# context: org-context
114+
# docker_hub_organization: prometheuscommunity
115+
# quay_io_organization: prometheuscommunity
116+
# requires:
117+
# - test
118+
# - build_all
119+
# filters:
120+
# branches:
121+
# only: master
122+
# - prometheus/publish_release:
123+
# context: org-context
124+
# docker_hub_organization: prometheuscommunity
125+
# # quay_io_organization: prometheuscommunity
126+
# requires:
127+
# - test
128+
# - build_all
129+
# filters:
130+
# tags:
131+
# only: /^v.*/
132+
# branches:
133+
# ignore: /.*/

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ all::
33

44
# Needs to be defined before including Makefile.common to auto-generate targets
55
DOCKER_ARCHS ?= amd64 armv7 arm64 ppc64le
6-
DOCKER_REPO ?= prometheuscommunity
6+
DOCKER_REPO ?= tetrate
77

88
include Makefile.common
99

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -445,3 +445,12 @@ docker run -p 5432:5432 -e POSTGRES_DB=circle_test -e POSTGRES_USER=postgres -e
445445
# Run the integration tests
446446
DATA_SOURCE_NAME='postgresql://postgres:test@localhost:5432/circle_test?sslmode=disable' GOOPTS='-v -tags integration' make test
447447
```
448+
449+
# **Tetrate CVE builds**
450+
Upstream is not fixing CVEs reported by security scanners, but not applicable to postgres_exporter image.
451+
These false positives can be fixed by cutting tetrate specific patch releases as follows:
452+
- Push a commit to a release branch in our fork (e.g. `release-v0.18.1` branch) with the changes to fix the CVEs.
453+
- In this PR, include changes to the `VERSION` file to the new version name following the pattern `<current-version>-tetrate-v<patch-number>`. For example `v0.18.1-tetrate-v0` is the first CVEs fixing patch for `v0.18.1`.
454+
- Once the PR is approved and merged:
455+
- Create the tag and push it to the repository.
456+
- CircleCI will automatically build the images and push them to the [tetrate docker hub repository](https://hub.docker.com/r/tetrate/postgres_exporter).

0 commit comments

Comments
 (0)