Skip to content

Commit c8876b7

Browse files
committed
Migrate to PromCI
Migrate CI to PromCI GitHub actions. * Update Go to 1.26.x. Signed-off-by: SuperQ <superq@gmail.com>
1 parent 04152cd commit c8876b7

File tree

5 files changed

+85
-55
lines changed

5 files changed

+85
-55
lines changed

.circleci/config.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,15 @@ updates:
44
directory: "/"
55
schedule:
66
interval: "monthly"
7+
groups:
8+
aws:
9+
patterns:
10+
- "github.com/aws/*"
11+
- package-ecosystem: "github-actions"
12+
directory: "/"
13+
schedule:
14+
interval: "monthly"
15+
# Exclude configs synced from upstream prometheus/prometheus.
16+
exclude-paths:
17+
- .github/workflows/container_description.yml
18+
- .github/workflows/golangci-lint.yml

.github/workflows/ci.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
name: CI
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main, master, 'release-*']
7+
tags: ['v*']
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test_go:
14+
name: Go tests
15+
runs-on: ubuntu-latest
16+
container:
17+
# Whenever the Go version is updated here, .promu.yml
18+
# should also be updated.
19+
image: quay.io/prometheus/golang-builder:1.26-base
20+
steps:
21+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22+
- uses: prometheus/promci-setup@5af30ba8c199a91d6c04ebdc3c48e630e355f62d # v0.1.0
23+
- run: make GO_ONLY=1 SKIP_GOLANGCI_LINT=1
24+
25+
build:
26+
name: Build
27+
runs-on: ubuntu-latest
28+
strategy:
29+
matrix:
30+
thread: [ 0, 1, 2, 3]
31+
steps:
32+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+
- uses: prometheus/promci/build@9c86752f3395e08c57719af549cc455d8e2c2514 # v0.7.0
34+
with:
35+
parallelism: 4
36+
thread: ${{ matrix.thread }}
37+
38+
publish_main:
39+
name: Publish main branch artifacts
40+
runs-on: ubuntu-latest
41+
needs: [test_go, build]
42+
if: |
43+
(github.event_name == 'push' && github.event.ref == 'refs/heads/main')
44+
||
45+
(github.event_name == 'push' && github.event.ref == 'refs/heads/master')
46+
steps:
47+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
48+
- uses: prometheus/promci/publish_main@9c86752f3395e08c57719af549cc455d8e2c2514 # v0.7.0
49+
with:
50+
docker_hub_organization: prometheuscommunity
51+
docker_hub_password: ${{ secrets.docker_hub_password }}
52+
quay_io_organization: prometheuscommunity
53+
quay_io_password: ${{ secrets.quay_io_password }}
54+
55+
publish_release:
56+
name: Publish release artefacts
57+
runs-on: ubuntu-latest
58+
needs: [test_go, build]
59+
if: |
60+
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
61+
steps:
62+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
63+
- uses: prometheus/promci/publish_release@9c86752f3395e08c57719af549cc455d8e2c2514 # v0.7.0
64+
with:
65+
docker_hub_organization: prometheuscommunity
66+
docker_hub_password: ${{ secrets.docker_hub_password }}
67+
quay_io_organization: prometheuscommunity
68+
quay_io_password: ${{ secrets.quay_io_password }}
69+
github_token: ${{ secrets.PROMBOT_GITHUB_TOKEN }}

.promu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
go:
2-
# This must match .circle/config.yml.
3-
version: 1.25
2+
# This must match .github/workflows/ci.yml.
3+
version: 1.26
44
repository:
55
path: github.com/prometheus-community/stackdriver_exporter
66
build:

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Google Stackdriver Prometheus Exporter
2-
[![Build Status](https://circleci.com/gh/prometheus-community/stackdriver_exporter.svg?style=svg)](https://circleci.com/gh/prometheus-community/stackdriver_exporter)
2+
3+
[![Build Status](https://github.com/prometheus-community/stackdriver_exporter/actions/workflows/ci.yml/badge.svg)](https://github.com/prometheus-community/stackdriver_exporter/actions/workflows/ci.yml)
34
[![golangci-lint](https://github.com/prometheus-community/stackdriver_exporter/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/prometheus-community/stackdriver_exporter/actions/workflows/golangci-lint.yml)
45
[![Go Report Card](https://goreportcard.com/badge/github.com/prometheus-community/stackdriver_exporter)](https://goreportcard.com/report/github.com/prometheus-community/stackdriver_exporter)
56
[![GoDoc](https://pkg.go.dev/badge/github.com/prometheus-community/stackdriver_exporter?status.svg)](https://pkg.go.dev/github.com/prometheus-community/stackdriver_exporter?tab=doc)

0 commit comments

Comments
 (0)