Skip to content

Commit f3e3637

Browse files
committed
Merge branch 'master' of github.com:MicroOps-cn/alertmanager
2 parents 899eb15 + 4483a86 commit f3e3637

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+922
-475
lines changed

.circleci/config.yml

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ jobs:
88
# We need to use a machine executor because the front-end validation runs
99
# containers with mounted volumes which isn't supported with the docker
1010
# executor (even with setup_remote_docker).
11-
machine: true
11+
machine:
12+
image: ubuntu-2204:current
1213
steps:
1314
- checkout
1415
- run: sudo service docker restart
@@ -17,7 +18,7 @@ jobs:
1718
command: sudo rm -rf /usr/local/go
1819
# Whenever the Go version is updated here, .promu.yml should also be updated.
1920
- go/install:
20-
version: "1.17"
21+
version: "1.18"
2122
- run:
2223
name: Remove generated code
2324
command: make clean
@@ -36,18 +37,25 @@ jobs:
3637
- run: git diff --exit-code
3738
- store_test_results:
3839
path: ~/test-results
40+
- run:
41+
name: Save assets
42+
command: make assets-tarball
43+
- persist_to_workspace:
44+
root: .
45+
paths:
46+
- .tarballs
3947
test:
4048
docker:
4149
# Whenever the Go version is updated here, .promu.yml should also be updated.
42-
- image: quay.io/prometheus/golang-builder:1.17-base
50+
- image: quay.io/prometheus/golang-builder:1.18-base
4351
# maildev containers are for running the email tests against a "real" SMTP server.
4452
# See notify/email_test.go for details.
45-
- image: djfarrelly/maildev:1.1.0
53+
- image: maildev/maildev:1.1.0
4654
name: maildev-noauth
4755
entrypoint: bin/maildev
4856
command:
4957
- -v
50-
- image: djfarrelly/maildev:1.1.0
58+
- image: maildev/maildev:1.1.0
5159
name: maildev-auth
5260
entrypoint: bin/maildev
5361
command:
@@ -96,13 +104,13 @@ jobs:
96104
mixin:
97105
docker:
98106
# Whenever the Go version is updated here, .promu.yml should also be updated.
99-
- image: quay.io/prometheus/golang-builder:1.17-base
107+
- image: quay.io/prometheus/golang-builder:1.18-base
100108
steps:
101109
- checkout
102-
- run: cd doc/alertmanager-mixin; go install github.com/monitoring-mixins/mixtool/cmd/mixtool@latest
103-
- run: cd doc/alertmanager-mixin; go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest
104-
- run: cd doc/alertmanager-mixin; go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
105-
- run: cd doc/alertmanager-mixin; make lint
110+
- run: go install github.com/monitoring-mixins/mixtool/cmd/mixtool@latest
111+
- run: go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest
112+
- run: go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
113+
- run: make -C doc/alertmanager-mixin lint
106114
workflows:
107115
version: 2
108116
alertmanager:
@@ -117,10 +125,21 @@ workflows:
117125
only: /.*/
118126
- prometheus/build:
119127
name: build
120-
parallelism: 8
128+
parallelism: 3
129+
promu_opts: "-p linux/amd64 -p windows/amd64 -p linux/arm64 -p darwin/amd64 -p darwin/arm64 -p linux/386"
121130
filters:
122131
tags:
123-
only: /.*/
132+
ignore: /^v2(\.[0-9]+){2}(-.+|[^-.]*)$/
133+
branches:
134+
ignore: /^(main|release-.*|.*build-all.*)$/
135+
- prometheus/build:
136+
name: build_all
137+
parallelism: 12
138+
filters:
139+
branches:
140+
only: /^(main|release-.*|.*build-all.*)$/
141+
tags:
142+
only: /^v2(\.[0-9]+){2}(-.+|[^-.]*)$/
124143
- mixin:
125144
filters:
126145
tags:
@@ -130,7 +149,7 @@ workflows:
130149
requires:
131150
- test_frontend
132151
- test
133-
- build
152+
- build_all
134153
filters:
135154
branches:
136155
only: main
@@ -139,7 +158,7 @@ workflows:
139158
requires:
140159
- test_frontend
141160
- test
142-
- build
161+
- build_all
143162
filters:
144163
tags:
145164
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "gomod"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
- package-ecosystem: "docker"
8+
directory: "/"
9+
schedule:
10+
interval: "monthly"

.promu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
go:
22
# Whenever the Go version is updated here, .travis.yml and
33
# .circle/config.yml should also be updated.
4-
version: 1.17
4+
version: 1.18
55
repository:
66
path: github.com/prometheus/alertmanager
77
build:

.yamllint

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ rules:
1414
document-start: disable
1515
indentation:
1616
spaces: consistent
17+
indent-sequences: consistent
1718
key-duplicates:
1819
ignore: |
1920
config/testdata/section_key_dup.bad.yml

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## 0.24.0-rc.0 / 2022-03-10
1+
## 0.24.0 / 2022-03-24
22

33
* [CHANGE] Add the `/api/v2` prefix to all endpoints in the OpenAPI specification and generated client code. #2696
44
* [CHANGE] Remove the `github.com/prometheus/alertmanager/client` Go package. #2763

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
## Prometheus Community Code of Conduct
1+
# Prometheus Community Code of Conduct
22

3-
Prometheus follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
3+
Prometheus follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md).

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ build-all: assets apiv2 build
2929
.PHONY: assets
3030
assets: asset/assets_vfsdata.go
3131

32+
.PHONY: assets-tarball
33+
assets-tarball: ui/app/script.js ui/app/index.html
34+
scripts/package_assets.sh
35+
3236
asset/assets_vfsdata.go: ui/app/script.js ui/app/index.html ui/app/lib template/default.tmpl template/email.tmpl
3337
GO111MODULE=$(GO111MODULE) $(GO) generate $(GOOPTS) ./asset
3438
@$(GOFMT) -w ./asset

Makefile.common

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
8383

8484
GOLANGCI_LINT :=
8585
GOLANGCI_LINT_OPTS ?=
86-
GOLANGCI_LINT_VERSION ?= v1.44.2
86+
GOLANGCI_LINT_VERSION ?= v1.45.2
8787
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64.
8888
# windows isn't included here because of the path separator being different.
8989
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ _API v2 is still under heavy development and thereby subject to change._
210210

211211
Alternatively you can install with:
212212
```
213-
go get github.com/prometheus/alertmanager/cmd/amtool
213+
$ go install github.com/prometheus/alertmanager/cmd/amtool@latest
214214
```
215215

216216
### Examples

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
The Prometheus security policy, including how to report vulnerabilities, can be
44
found here:
55

6-
https://prometheus.io/docs/operating/security/
6+
<https://prometheus.io/docs/operating/security/>

0 commit comments

Comments
 (0)