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
84 changes: 17 additions & 67 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,83 +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

executors:
# Whenever the Go version is updated here, .promu.yml should also be updated.
golang:
docker:
- image: cimg/go:1.26
- image: busybox

jobs:
test:
executor: golang

steps:
- setup_remote_docker
- checkout
- run: go build -o promu-intermediate
- run: make check_license style unused lint test build PROMU=./promu-intermediate
- store_artifacts:
path: promu
destination: /build/promu
- run: rm -v promu promu-intermediate
- run: git diff --exit-code

build:
executor: golang
environment:
PROMU: ./promu-intermediate
working_directory: /home/circleci/.go_workspace/src/github.com/prometheus/promu
parallelism: 5

steps:
- setup_remote_docker
- checkout
- run: go build -o promu-intermediate
- run: ./promu-intermediate crossbuild -v --parallelism $CIRCLE_NODE_TOTAL --parallelism-thread $CIRCLE_NODE_INDEX
- persist_to_workspace:
root: .
paths:
- .build
- store_artifacts:
path: .build
destination: /build

release_tags:
noopjob:
executor: golang
environment:
PROMU: ./promu-intermediate

steps:
- checkout
- attach_workspace:
at: .
- run: go build -o promu-intermediate
- run: ./promu-intermediate crossbuild tarballs
- run: ./promu-intermediate checksum .tarballs
- run: ./promu-intermediate release .tarballs
- store_artifacts:
path: .tarballs
destination: releases
- run:
command: "true"

workflows:
version: 2
promu:
jobs:
- test:
filters:
tags:
only: /.*/
- build:
filters:
tags:
only: /.*/
- release_tags:
context: org-context
requires:
- test
- build
filters:
tags:
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
branches:
ignore: /.*/
- noopjob
triggers:
- schedule:
cron: "0 0 30 2 *"
filters:
branches:
only:
- main
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@ updates:
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
# Exclude configs synced from upstream prometheus/prometheus.
exclude-paths:
- .github/workflows/container_description.yml
- .github/workflows/golangci-lint.yml
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CI

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

jobs:
test_go:
name: Go tests
runs-on: ubuntu-latest
env:
PROMU: ./promu-intermediate
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: 1.26.x
- run: go build -o promu-intermediate
- run: make check_license style unused lint test build
- run: rm -v promu promu-intermediate
- run: git diff --exit-code

build:
name: Build for common architectures
runs-on: ubuntu-latest
env:
PROMU: ./promu-intermediate
strategy:
matrix:
thread: [ 0, 1, 2, 3]
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Install Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
with:
go-version: 1.26.x
- run: go build -o promu-intermediate
- run: ./promu-intermediate crossbuild -v --parallelism 4 --parallelism-thread ${{ matrix.thread }}
- uses: prometheus/promci-artifacts/save@f9a587dbc0b2c78a0c54f8ad1cde71ea29a4b76f # v0.1.0

publish_release:
name: Publish release artifacts
runs-on: ubuntu-latest
needs: [test_go, build]
if: |
(github.repository == 'prometheus/promu')
&&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: prometheus/promci/publish_release@769ee18070cd21cfc2a24fa912349fd3e48dee58 # v0.6.0
with:
github_token: ${{ secrets.PROMBOT_GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/promu
/promu-intermediate
.build
.tarballs
testoutput
Expand Down
Loading