Skip to content
Merged
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
146 changes: 0 additions & 146 deletions .circleci/config.yml

This file was deleted.

23 changes: 22 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
name: CI
on:
pull_request:
workflow_call:
push:

permissions:
contents: read

jobs:
yamllint:
name: Yaml lint
Expand All @@ -13,5 +17,22 @@ jobs:
# should also be updated.
image: quay.io/prometheus/golang-builder:1.26-base
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- run: make yamllint

test_go:
name: Go build and tests
runs-on: ubuntu-latest
container:
# Whenever the Go version is updated here, .promu.yml
# should also be updated.
image: quay.io/prometheus/golang-builder:1.26-base
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: prometheus/promci-setup@5af30ba8c199a91d6c04ebdc3c48e630e355f62d # v0.1.0
- run: make all
- run: make -C prombench check_config
103 changes: 103 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
name: Publish
on:
workflow_call:
push:
branches:
- master

permissions:
contents: read

jobs:
ci:
name: Run CI
uses: ./.github/workflows/ci.yml

publish_infra:
name: Publish infra
runs-on: ubuntu-latest
needs: ci
env:
DOCKER_ORG: ${{ vars.DOCKER_ORG || 'prominfra' }}
DOCKER_REGISTRY: docker.io
DOCKER_IMAGE_TAG: master
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: 1.26.x
- uses: prometheus/promci-setup@5af30ba8c199a91d6c04ebdc3c48e630e355f62d # v0.1.0
- name: Build infra binary
run: make build
env:
PROMU_BINARIES: infra
- name: Log in to Docker Hub
run: echo "${{ secrets.docker_hub_password }}" | docker login -u "${{ secrets.docker_hub_login }}" --password-stdin "${DOCKER_REGISTRY}"
- name: Build image
run: >-
docker build
-t "${DOCKER_REGISTRY}/${DOCKER_ORG}/infra:${DOCKER_IMAGE_TAG}"
-f "infra/Dockerfile"
"infra/"
- name: Publish image
run: docker push "${DOCKER_REGISTRY}/${DOCKER_ORG}/infra:${DOCKER_IMAGE_TAG}"

publish_others:
name: Publish ${{ matrix.image }}
runs-on: ubuntu-latest
needs: publish_infra
strategy:
fail-fast: false
matrix:
include:
- image: prombench
dockerfile: prombench/Dockerfile
context: prombench/
- image: amgithubnotifier
dockerfile: tools/amGithubNotifier/Dockerfile
context: tools/amGithubNotifier/
- image: comment-monitor
dockerfile: tools/comment-monitor/Dockerfile
context: tools/comment-monitor/
- image: fake-webserver
dockerfile: tools/fake-webserver/Dockerfile
context: tools/fake-webserver/
- image: scaler
dockerfile: tools/scaler/Dockerfile
context: tools/scaler/
- image: load-generator
dockerfile: tools/load-generator/Dockerfile
context: tools/load-generator/
- image: prometheus-builder
dockerfile: tools/prometheus-builder/Dockerfile
context: tools/prometheus-builder/
- image: block-sync
dockerfile: tools/block-sync/Dockerfile
context: tools/block-sync/
env:
DOCKER_ORG: ${{ vars.DOCKER_ORG || 'prominfra' }}
DOCKER_REGISTRY: docker.io
DOCKER_IMAGE_TAG: master
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
with:
go-version: 1.26.x
- uses: prometheus/promci-setup@5af30ba8c199a91d6c04ebdc3c48e630e355f62d # v0.1.0
- name: Build binaries
run: make build
- name: Log in to Docker Hub
run: echo "${{ secrets.docker_hub_password }}" | docker login -u "${{ secrets.docker_hub_login }}" --password-stdin "${DOCKER_REGISTRY}"
- name: Build image
run: >-
docker build
-t "${DOCKER_REGISTRY}/${DOCKER_ORG}/${{ matrix.image }}:${DOCKER_IMAGE_TAG}"
-f "${{ matrix.dockerfile }}"
"${{ matrix.context }}"
- name: Publish image
run: docker push "${DOCKER_REGISTRY}/${DOCKER_ORG}/${{ matrix.image }}:${DOCKER_IMAGE_TAG}"