Skip to content
Draft
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
34 changes: 34 additions & 0 deletions .github/workflows/grafana-alertcheck-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Grafana Alertcheck Release

on:
push:
tags:
- grafana-alertcheck/v*

jobs:
release:
name: Build and Release
runs-on: ubuntu-latest
environment: integration
permissions:
id-token: write
contents: write
steps:
- name: Checkout repo
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: ./grafana-alertcheck/go.mod
cache-dependency-path: ./grafana-alertcheck/go.mod
- name: Goreleaser Release
uses: goreleaser/goreleaser-action@f06c13b6b1a9625abc9e6e439d9c05a8f2190e94 # v7.2.3
with:
distribution: goreleaser-pro
version: "~> v2"
args: release --clean -f ./grafana-alertcheck/.goreleaser.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
3 changes: 3 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- path: parrot
vm: ubuntu-latest
regex: ./...
- path: grafana-alertcheck
vm: ubuntu-latest
regex: ./...
- path: tools/workflowresultparser
vm: ubuntu-latest
regex: ./...
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,6 @@ parrot/parrot
# Devenv (generated manually)
devenv/
# Generated TOML definitions
book/src/framework/developer_environment/**.toml
book/src/framework/developer_environment/**.toml

tmp/
33 changes: 33 additions & 0 deletions grafana-alertcheck/.goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json
version: 2
project_name: grafana-alertcheck

dist: grafana-alertcheck/dist

monorepo:
tag_prefix: grafana-alertcheck/
dir: grafana-alertcheck

builds:
- id: grafana-alertcheck
main: ./cmd/grafana-alertcheck/main.go
ldflags:
- -s
- -w
- -X github.com/smartcontractkit/chainlink-testing-framework/grafana-alertcheck.version={{.Version}}
- -X github.com/smartcontractkit/chainlink-testing-framework/grafana-alertcheck.commit={{.ShortCommit}}
- -X github.com/smartcontractkit/chainlink-testing-framework/grafana-alertcheck.date={{.CommitDate}}
- -X github.com/smartcontractkit/chainlink-testing-framework/grafana-alertcheck.builtBy=goreleaser
goos:
- linux
- darwin
goarch:
- amd64
- arm64
binary: grafana-alertcheck
env:
- CGO_ENABLED=0

before:
hooks:
- sh -c "cd grafana-alertcheck && go mod tidy"
6 changes: 6 additions & 0 deletions grafana-alertcheck/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# grafana-alertcheck

A CD quality gate for Grafana alerts: bookend a release with `watch` (record) and `check` (classify) to
answer whether any watched alert was in a bad state during the release window.

Under construction.
7 changes: 7 additions & 0 deletions grafana-alertcheck/cmd/grafana-alertcheck/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "os"

func main() {
os.Exit(2)
}
3 changes: 3 additions & 0 deletions grafana-alertcheck/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/smartcontractkit/chainlink-testing-framework/grafana-alertcheck

go 1.26.6
2 changes: 2 additions & 0 deletions grafana-alertcheck/internal/gate/gate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package gate implements the grafana-alertcheck coverage-and-classification gate.
package gate
Loading