forked from prometheus/alertmanager
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
57 changed files
with
1,440 additions
and
339 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,45 @@ | ||
--- | ||
name: CI | ||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
workflow_call: | ||
jobs: | ||
test_frontend: | ||
name: Test alertmanager frontend | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: make clean | ||
- run: make all | ||
working-directory: ./ui/app | ||
- run: make assets | ||
- run: make apiv2 | ||
- run: git diff --exit-code | ||
|
||
build: | ||
name: Build Alertmanager for common architectures | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
thread: [ 0, 1, 2 ] | ||
steps: | ||
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | ||
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0 | ||
- uses: ./.github/promci/actions/build | ||
with: | ||
promu_opts: "-p linux/amd64 -p windows/amd64 -p linux/arm64 -p darwin/amd64 -p darwin/arm64 -p linux/386" | ||
parallelism: 3 | ||
thread: ${{ matrix.thread }} | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
# Whenever the Go version is updated here, .promu.yml | ||
# should also be updated. | ||
container: | ||
image: quay.io/prometheus/golang-builder:1.19-base | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: prometheus/[email protected] | ||
- uses: ./.github/promci/actions/setup_environment | ||
- run: make |
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,27 @@ | ||
name: golangci-lint | ||
on: | ||
pull_request: | ||
paths: | ||
- "go.sum" | ||
- "go.mod" | ||
- "**.go" | ||
- "scripts/errcheck_excludes.txt" | ||
- ".github/workflows/golangci-lint.yml" | ||
- ".golangci.yml" | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.19.x | ||
- run: make build | ||
- name: Lint | ||
uses: golangci/[email protected] | ||
with: | ||
version: v1.51.2 |
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,22 @@ | ||
name: mixin | ||
on: | ||
pull_request: | ||
paths: | ||
- "doc/alertmanager-mixin/**" | ||
|
||
jobs: | ||
mixin: | ||
name: mixin-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.19.x | ||
# pin the mixtool version until https://github.com/monitoring-mixins/mixtool/issues/135 is merged. | ||
- run: go install github.com/monitoring-mixins/mixtool/cmd/mixtool@2282201396b69055bb0f92f187049027a16d2130 | ||
- run: go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest | ||
- run: go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest | ||
- run: make -C doc/alertmanager-mixin lint |
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,38 @@ | ||
--- | ||
name: Publish | ||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
ci: | ||
name: Run ci | ||
uses: ./.github/workflows/ci.yml | ||
|
||
build: | ||
name: Build Alertmanager for all architectures | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
thread: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ] | ||
needs: ci | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0 | ||
- uses: ./.github/promci/actions/build | ||
with: | ||
parallelism: 12 | ||
thread: ${{ matrix.thread }} | ||
publish_main: | ||
name: Publish main branch artefacts | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0 | ||
- uses: ./.github/promci/actions/publish_main | ||
with: | ||
docker_hub_login: ${{ secrets.docker_hub_login }} | ||
docker_hub_password: ${{ secrets.docker_hub_password }} | ||
quay_io_login: ${{ secrets.quay_io_login }} | ||
quay_io_password: ${{ secrets.quay_io_password }} |
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,38 @@ | ||
--- | ||
name: Release | ||
on: # yamllint disable-line rule:truthy | ||
push: | ||
tags: | ||
- v* | ||
jobs: | ||
ci: | ||
name: Run ci | ||
uses: ./.github/workflows/ci.yml | ||
|
||
build: | ||
name: Build Alertmanager for all architectures | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
thread: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ] | ||
needs: ci | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0 | ||
- uses: ./.github/promci/actions/build | ||
with: | ||
parallelism: 12 | ||
thread: ${{ matrix.thread }} | ||
publish_release: | ||
name: Publish release artefacts | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: prometheus/promci@3cb0c3871f223bd5ce1226995bd52ffb314798b6 # v0.1.0 | ||
- uses: ./.github/promci/actions/publish_release | ||
with: | ||
docker_hub_login: ${{ secrets.docker_hub_login }} | ||
docker_hub_password: ${{ secrets.docker_hub_password }} | ||
quay_io_login: ${{ secrets.quay_io_login }} | ||
quay_io_password: ${{ secrets.quay_io_password }} |
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 |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
!/.travis.yml | ||
!/.promu.yml | ||
!/api/v2/openapi.yaml | ||
!.github/workflows/*.yml | ||
|
||
# Editor | ||
.vscode | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.