Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 19 additions & 39 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,33 @@
---
# Prometheus has switched to GitHub action.
# Circle CI 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: quay.io/prometheus/golang-builder:1.25-base
- image: busybox

jobs:
test:
noopjob:
executor: golang

steps:
- prometheus/setup_environment
- run: make
- prometheus/store_artifact:
file: prom-label-proxy
- store_test_results:
path: test-results
- run:
command: "true"

workflows:
version: 2
prom-label-proxy:
jobs:
- test:
- noopjob
triggers:
- schedule:
cron: "0 0 30 2 *"
filters:
tags:
only: /.*/
- prometheus/build:
name: build
filters:
tags:
only: /.*/
- prometheus/publish_main:
docker_hub_organization: "" # Don't publish to DockerHub.
quay_io_organization: prometheuscommunity
requires:
- test
- build
filters:
branches:
only: main
- prometheus/publish_release:
docker_hub_organization: "" # Don't publish to DockerHub.
quay_io_organization: prometheuscommunity
requires:
- test
- build
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
only:
- main
16 changes: 13 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
- package-ecosystem: gomod
directory: /
schedule:
interval: "weekly"
interval: monthly
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 10
# Exclude configs synced from upstream prometheus/prometheus.
exclude-paths:
- .github/workflows/container_description.yml
- .github/workflows/golangci-lint.yml
95 changes: 95 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: CI

on:
push:
tags:
- 'v*'
branches:
- master
pull_request:
workflow_call:

jobs:
test_go:
name: Go tests
runs-on: ubuntu-latest
container:
image: quay.io/prometheus/golang-builder:1.26-base
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: prometheus/promci-setup@5af30ba8c199a91d6c04ebdc3c48e630e355f62d # v0.1.0
- run: make

build:
name: Build for common architectures
runs-on: ubuntu-latest
if: |
!(github.event_name == 'push' && github.event.ref == 'refs/heads/master')
&&
!(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
strategy:
matrix:
thread: [ 0, 1, 2 ]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: prometheus/promci/build@769ee18070cd21cfc2a24fa912349fd3e48dee58 # v0.6.0
with:
promu_opts: "-p linux/amd64 -p windows/amd64 -p darwin/amd64 -p linux/arm64 -p windows/arm64 -p darwin/arm64"
parallelism: 3
thread: ${{ matrix.thread }}

build_all:
name: Build for all architectures
runs-on: ubuntu-latest
if: |
(github.event_name == 'push' && github.event.ref == 'refs/heads/master')
||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
strategy:
matrix:
thread: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: prometheus/promci/build@769ee18070cd21cfc2a24fa912349fd3e48dee58 # v0.6.0
with:
parallelism: 12
thread: ${{ matrix.thread }}

publish_master:
name: Publish master branch artifacts
runs-on: ubuntu-latest
needs: [test_go, build_all]
if: |
(github.repository == 'prometheus-community/prom-label-proxy')
&&
(github.event_name == 'push' && github.event.ref == 'refs/heads/master')
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: prometheus/promci/publish_main@769ee18070cd21cfc2a24fa912349fd3e48dee58 # v0.6.0
with:
docker_hub_organization: prometheuscommunity
docker_hub_login: ${{ secrets.docker_hub_login }}
docker_hub_password: ${{ secrets.docker_hub_password }}
quay_io_organization: prometheuscommunity
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_go, build_all]
if: |
(github.repository == 'prometheus-community/prom-label-proxy')
&&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v0.'))
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: prometheus/promci/publish_release@769ee18070cd21cfc2a24fa912349fd3e48dee58 # v0.6.0
with:
docker_hub_organization: prometheuscommunity
docker_hub_login: ${{ secrets.docker_hub_login }}
docker_hub_password: ${{ secrets.docker_hub_password }}
quay_io_organization: prometheuscommunity
quay_io_login: ${{ secrets.quay_io_login }}
quay_io_password: ${{ secrets.quay_io_password }}
github_token: ${{ secrets.PROMBOT_GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .promu.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
go:
# This must match .circle/config.yml.
version: 1.25
version: 1.26
repository:
path: github.com/prometheus-community/prom-label-proxy
build:
Expand Down