Skip to content

Commit e272675

Browse files
sleepyfoodieskl
andauthored
chore: automate-release-process (#1027)
* chore: automate-release-process * Update README.md Co-authored-by: Stephen Lang <[email protected]> * Update README.md Co-authored-by: Stephen Lang <[email protected]> * Update README.md Co-authored-by: Stephen Lang <[email protected]> * Update README.md Co-authored-by: Stephen Lang <[email protected]> * chore: modify markdown * chore: check markdown formatting * Update README.md * Update README.md * Update README.md * Update README.md --------- Co-authored-by: Stephen Lang <[email protected]>
1 parent 96d585c commit e272675

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

.github/workflows/release.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "version-*" # Trigger the workflow on push events to version-* tags
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Create release on kubernetes-mixin
17+
uses: softprops/action-gh-release@v2
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
with:
21+
tag_name: ${{ github.ref_name }}
22+
repository: kubernetes-monitoring/kubernetes-mixin
23+
generate_release_notes: true

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ A set of Grafana dashboards and Prometheus alerts for Kubernetes.
88

99
## Releases
1010

11+
> Note: Releases up until `release-0.12` are changes in their own branches. Changelogs are included in releases starting from [version-0.13.0](https://github.com/kubernetes-monitoring/kubernetes-mixin/releases/tag/version-0.13.0).
12+
1113
| Release branch | Kubernetes Compatibility | Prometheus Compatibility | Kube-state-metrics Compatibility |
1214
|----------------|--------------------------|--------------------------|----------------------------------|
1315
| release-0.1 | v1.13 and before | | |
@@ -33,6 +35,27 @@ Warning: This compatibility matrix was initially created based on experience, we
3335

3436
Warning: By default the expressions will generate *grafana 7.2+* compatible rules using the *$__rate_interval* variable for rate functions. If you need backward compatible rules please set *grafana72: false* in your *_config*
3537

38+
### Release steps
39+
40+
Maintainers can trigger the [release workflow](.github/workflows/release.yaml) by pushing a git tag that matches the pattern: `version-*`.
41+
42+
1. Checkout `master` branch and pull for latest.
43+
44+
```bash
45+
git checkout master
46+
```
47+
48+
2. Create a tag following sem-ver versioning for the version and trigger release.
49+
50+
```bash
51+
# replace MAJOR.MINOR.PATCH with e.g. 1.2.3
52+
tag=version-MAJOR.MINOR.PATCH; git tag $tag && git push origin $tag
53+
```
54+
55+
#### Decisions on backfilling releases
56+
57+
We wanted to backfill `release-0.1` to `release-0.12` to have a changelog, but we were not able to use a GitHub action in a newer commit to trigger a release that generates a changelog on older commits. See #489 for full discussion.
58+
3659
## How to use
3760

3861
This mixin is designed to be vendored into the repo with your infrastructure config. To do this, use [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler):

0 commit comments

Comments
 (0)