Skip to content

Commit c3bf1e8

Browse files
author
Julien Pivotto
committed
Update build to github action & release 0.8.0
Signed-off-by: Julien Pivotto <[email protected]>
1 parent bca43f1 commit c3bf1e8

33 files changed

+207
-187
lines changed

.circleci/config.yml

+23-36
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,33 @@
11
---
2+
# Prometheus has switched to GitHub action.
3+
# Circle CI is not disabled repository-wise so that previous pull requests
4+
# continue working.
5+
# This file does not generate any CircleCI workflow.
6+
27
version: 2.1
38

4-
orbs:
5-
go: circleci/[email protected]
9+
executors:
10+
golang:
11+
docker:
12+
- image: busybox
613

714
jobs:
8-
test:
9-
parameters:
10-
go_version:
11-
type: string
12-
use_gomod_cache:
13-
type: boolean
14-
default: true
15-
docker:
16-
- image: cimg/go:<< parameters.go_version >>
15+
noopjob:
16+
executor: golang
17+
1718
steps:
18-
- checkout
19-
- when:
20-
condition: << parameters.use_gomod_cache >>
21-
steps:
22-
- go/load-cache:
23-
key: v1-go<< parameters.go_version >>
24-
- run: make test
25-
- when:
26-
condition: << parameters.use_gomod_cache >>
27-
steps:
28-
- go/save-cache:
29-
key: v1-go<< parameters.go_version >>
30-
- store_test_results:
31-
path: test-results
19+
- run:
20+
command: "true"
3221

3322
workflows:
3423
version: 2
35-
tests:
24+
prometheus:
3625
jobs:
37-
# Support the last two go releases, as per https://golang.org/dl/.
38-
- test:
39-
name: go-1-17
40-
go_version: "1.17"
41-
- test:
42-
name: go-1-18
43-
go_version: "1.18"
44-
- test:
45-
name: go-1-19
46-
go_version: "1.19"
26+
- noopjob
27+
triggers:
28+
- schedule:
29+
cron: "0 0 30 2 *"
30+
filters:
31+
branches:
32+
only:
33+
- main

.github/workflows/ci.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: CI
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
push:
6+
jobs:
7+
test:
8+
name: Test
9+
runs-on: ubuntu-latest
10+
container:
11+
image: quay.io/prometheus/golang-builder:1.19-base
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: prometheus/[email protected]
15+
- uses: ./.github/promci/actions/setup_environment
16+
- run: make test
17+
18+
golangci:
19+
name: golangci-lint
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v3
24+
- name: Install Go
25+
uses: actions/setup-go@v3
26+
with:
27+
go-version: '<1.19'
28+
- name: Lint
29+
uses: golangci/[email protected]
30+
with:
31+
version: v1.49.0

.github/workflows/codeql-analysis.yml

+25-25
Original file line numberDiff line numberDiff line change
@@ -34,34 +34,34 @@ jobs:
3434
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
3535

3636
steps:
37-
- name: Checkout repository
38-
uses: actions/checkout@v2
37+
- name: Checkout repository
38+
uses: actions/checkout@v2
3939

40-
# Initializes the CodeQL tools for scanning.
41-
- name: Initialize CodeQL
42-
uses: github/codeql-action/init@v1
43-
with:
44-
languages: ${{ matrix.language }}
45-
# If you wish to specify custom queries, you can do so here or in a config file.
46-
# By default, queries listed here will override any specified in a config file.
47-
# Prefix the list here with "+" to use these queries and those in the config file.
48-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
40+
# Initializes the CodeQL tools for scanning.
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@v1
43+
with:
44+
languages: ${{ matrix.language }}
45+
# If you wish to specify custom queries, you can do so here or in a config file.
46+
# By default, queries listed here will override any specified in a config file.
47+
# Prefix the list here with "+" to use these queries and those in the config file.
48+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
4949

50-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51-
# If this step fails, then you should remove it and run the build manually (see below)
52-
- name: Autobuild
53-
uses: github/codeql-action/autobuild@v1
50+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
51+
# If this step fails, then you should remove it and run the build manually (see below)
52+
- name: Autobuild
53+
uses: github/codeql-action/autobuild@v1
5454

55-
# ℹ️ Command-line programs to run using the OS shell.
56-
# 📚 https://git.io/JvXDl
55+
# ℹ️ Command-line programs to run using the OS shell.
56+
# 📚 https://git.io/JvXDl
5757

58-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59-
# and modify them (or add more) to build your code if your project
60-
# uses a compiled language
58+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
59+
# and modify them (or add more) to build your code if your project
60+
# uses a compiled language
6161

62-
#- run: |
63-
# make bootstrap
64-
# make release
62+
#- run: |
63+
# make bootstrap
64+
# make release
6565

66-
- name: Perform CodeQL Analysis
67-
uses: github/codeql-action/analyze@v1
66+
- name: Perform CodeQL Analysis
67+
uses: github/codeql-action/analyze@v1

.github/workflows/golangci-lint.yml

-30
This file was deleted.

.yamllint

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
extends: default
3+
4+
rules:
5+
braces:
6+
max-spaces-inside: 1
7+
level: error
8+
brackets:
9+
max-spaces-inside: 1
10+
level: error
11+
commas: disable
12+
comments: disable
13+
comments-indentation: disable
14+
document-start: disable
15+
indentation:
16+
spaces: consistent
17+
indent-sequences: consistent
18+
key-duplicates:
19+
ignore: |
20+
config/testdata/section_key_dup.bad.yml
21+
line-length: disable
22+
truthy:
23+
ignore: |
24+
.github/workflows/codeql-analysis.yml
25+
.github/workflows/funcbench.yml
26+
.github/workflows/fuzzing.yml
27+
.github/workflows/prombench.yml
28+
.github/workflows/golangci-lint.yml

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.8.0 / 2022-10-10
2+
3+
* [CHANGE] Change some structs suffix from `Struct` to `Config` #114
4+
* [FEATURE] Add multiple listeners and systemd socket support #95
5+
* [FEATURE] Allow TLS parameters to be set in code #110
6+
17
## 0.7.1 / 2021-12-02
28

39
* [BUGFIX] Effectively enable HTTP/2 support. #72

go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ module github.com/prometheus/exporter-toolkit
33
go 1.17
44

55
require (
6-
github.com/coreos/go-systemd/v22 v22.3.2
6+
github.com/coreos/go-systemd/v22 v22.4.0
77
github.com/go-kit/log v0.2.1
88
github.com/prometheus/common v0.37.0
9-
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90
10-
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f
9+
golang.org/x/crypto v0.0.0-20221012134737-56aed061732a
10+
golang.org/x/sync v0.1.0
1111
gopkg.in/alecthomas/kingpin.v2 v2.2.6
1212
gopkg.in/yaml.v2 v2.4.0
1313
)

go.sum

+6-5
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH
8989
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
9090
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
9191
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
92-
github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=
93-
github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
92+
github.com/coreos/go-systemd/v22 v22.4.0 h1:y9YHcjnjynCd/DVbg5j9L/33jQM3MxJlbj/zWskzfGU=
93+
github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
9494
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
9595
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
9696
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -302,8 +302,8 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U
302302
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
303303
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
304304
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
305-
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM=
306-
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
305+
golang.org/x/crypto v0.0.0-20221012134737-56aed061732a h1:NmSIgad6KjE6VvHciPZuNRTKxGhlPfD6OA87W/PLkqg=
306+
golang.org/x/crypto v0.0.0-20221012134737-56aed061732a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
307307
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
308308
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
309309
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -420,8 +420,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
420420
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
421421
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
422422
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
423-
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8=
424423
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
424+
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
425+
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
425426
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
426427
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
427428
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tls_server_config :
2-
cert_file : "server.crt"
3-
key_file : "server.key"
4-
client_ca_file : "somefile"
1+
tls_server_config:
2+
cert_file: "server.crt"
3+
key_file: "server.key"
4+
client_ca_file: "somefile"
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tls_server_config :
2-
cert_file : "server.crt"
3-
key_file : "server.key"
4-
client_auth_type : "RequireAndVerifyClientCert"
1+
tls_server_config:
2+
cert_file: "server.crt"
3+
key_file: "server.key"
4+
client_auth_type: "RequireAndVerifyClientCert"
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
tls_server_config :
2-
cert_file : "server.crt"
3-
key_file : "server.key"
1+
tls_server_config:
2+
cert_file: "server.crt"
3+
key_file: "server.key"
44
basic_auth_users:
55
john: doe

web/testdata/web_config_junk_key.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
tls_server_config :
1+
tls_server_config:
22
cert_filse: "server.crt"
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tls_server_config :
2-
cert_file : "server.crt"
3-
key_file : "server.key"
4-
client_ca_file : "/dev/null"
1+
tls_server_config:
2+
cert_file: "server.crt"
3+
key_file: "server.key"
4+
client_ca_file: "/dev/null"
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tls_server_config :
2-
cert_file : "server.crt"
3-
key_file : "server.key"
4-
client_auth_type : "RequireAndVerifyClientCert"
1+
tls_server_config:
2+
cert_file: "server.crt"
3+
key_file: "server.key"
4+
client_auth_type: "RequireAndVerifyClientCert"
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tls_server_config :
2-
cert_file : "server.crt"
3-
key_file : "server.key"
4-
client_auth_type : "VerifyClientCertIfGiven"
1+
tls_server_config:
2+
cert_file: "server.crt"
3+
key_file: "server.key"
4+
client_auth_type: "VerifyClientCertIfGiven"

web/testdata/web_config_noAuth_allCiphers.good.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
tls_server_config :
2-
cert_file : "server.crt"
3-
key_file : "server.key"
4-
client_auth_type : "VerifyClientCertIfGiven"
1+
tls_server_config:
2+
cert_file: "server.crt"
3+
key_file: "server.key"
4+
client_auth_type: "VerifyClientCertIfGiven"
55
cipher_suites:
66
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
77
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
@@ -20,4 +20,3 @@ tls_server_config :
2020
- TLS_RSA_WITH_AES_256_CBC_SHA
2121
- TLS_RSA_WITH_AES_128_GCM_SHA256
2222
- TLS_RSA_WITH_AES_256_GCM_SHA384
23-

web/testdata/web_config_noAuth_allCurves.good.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
tls_server_config :
2-
cert_file : "server.crt"
3-
key_file : "server.key"
4-
client_auth_type : "VerifyClientCertIfGiven"
1+
tls_server_config:
2+
cert_file: "server.crt"
3+
key_file: "server.key"
4+
client_auth_type: "VerifyClientCertIfGiven"
55
curve_preferences:
66
- CurveP256
77
- CurveP384
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
tls_server_config :
2-
cert_file : ""
3-
key_file : "server.key"
1+
tls_server_config:
2+
cert_file: ""
3+
key_file: "server.key"
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
tls_server_config :
2-
cert_file : "somefile"
3-
key_file : "server.key"
1+
tls_server_config:
2+
cert_file: "somefile"
3+
key_file: "server.key"
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tls_server_config :
2-
cert_file : ""
3-
key_file : ""
1+
tls_server_config:
2+
cert_file: ""
3+
key_file: ""
44
client_auth_type: "x"

0 commit comments

Comments
 (0)