-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>
- Loading branch information
1 parent
36a8751
commit 9176dc5
Showing
4 changed files
with
87 additions
and
37 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 |
---|---|---|
@@ -1,48 +1,31 @@ | ||
# This project has switched to GitHub Actions. | ||
# CircleCI is not disabled repository-wise so that previous pull requests | ||
# continue working. | ||
# This file does not generate any CircleCI workflow. | ||
|
||
version: 2.1 | ||
orbs: | ||
prometheus: prometheus/prometheus@0.17.1 | ||
|
||
executors: | ||
# Whenever the Go version is updated here, .promu.yml should also be updated. | ||
golang: | ||
docker: | ||
- image: cimg/go:1.23 | ||
- image: busybox | ||
|
||
jobs: | ||
test: | ||
noopjob: | ||
executor: golang | ||
steps: | ||
- prometheus/setup_environment | ||
- run: make | ||
- run: git diff --exit-code | ||
- prometheus/store_artifact: | ||
file: statsd_exporter | ||
- run: | ||
command: "true" | ||
|
||
workflows: | ||
version: 2 | ||
statsd_exporter: | ||
jobs: | ||
- test: | ||
- noopjob | ||
triggers: | ||
- schedule: | ||
cron: "0 0 30 2 *" | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- prometheus/build: | ||
name: build | ||
filters: | ||
tags: | ||
only: /.*/ | ||
- prometheus/publish_master: | ||
context: org-context | ||
requires: | ||
- test | ||
- build | ||
filters: | ||
branches: | ||
only: master | ||
- prometheus/publish_release: | ||
context: org-context | ||
requires: | ||
- test | ||
- build | ||
filters: | ||
tags: | ||
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ | ||
branches: | ||
ignore: /.*/ | ||
only: | ||
- master |
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,67 @@ | ||
name: CI | ||
on: # yamllint disable-line rule:truthy | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
pull_request: | ||
|
||
jobs: | ||
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.23-base | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: prometheus/promci@c3c93a50d581b928af720f0134b2b2dad32a6c41 | ||
- uses: ./.github/promci/actions/setup_environment | ||
- run: make SKIP_GOLANGCI_LINT=1 | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
thread: [ 0, 1, 2, 3, 4, 5 ] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: prometheus/promci@c3c93a50d581b928af720f0134b2b2dad32a6c41 | ||
- uses: ./.github/promci/actions/build | ||
with: | ||
parallelism: 6 | ||
thread: ${{ matrix.thread }} | ||
|
||
publish_main: | ||
name: Publish main branch artifacts | ||
runs-on: ubuntu-latest | ||
needs: [test, build] | ||
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: prometheus/promci@v0.0.2 | ||
- 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 }} | ||
|
||
publish_release: | ||
name: Publish release artifacts | ||
runs-on: ubuntu-latest | ||
needs: [test, build] | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: prometheus/promci@v0.0.2 | ||
- 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 }} | ||
github_token: ${{ secrets.PROMBOT_GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/prometheus/statsd_exporter | ||
|
||
go 1.22 | ||
go 1.23 | ||
|
||
require ( | ||
github.com/alecthomas/kingpin/v2 v2.4.0 | ||
|