Skip to content

Commit 2d9ffba

Browse files
committed
Initial version
Signed-off-by: Nicolas Bigler <nicolas.bigler@vshn.ch>
1 parent db78857 commit 2d9ffba

23 files changed

+1234
-1
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[chart-name] SUMMARY"
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
## Describe the bug
11+
12+
A clear and concise description of what the bug is.
13+
14+
## Additional context
15+
16+
Add any other context about the problem here.
17+
18+
## To Reproduce
19+
20+
Steps to reproduce the behavior:
21+
1. ...
22+
23+
## Logs
24+
25+
If applicable, add logs to help explain your problem.
26+
```console
27+
28+
```
29+
30+
## Expected behavior
31+
32+
A clear and concise description of what you expected to happen.
33+
34+
**Environment (please complete the following information):**
35+
- Chart: latest
36+
- Helm: v3
37+
- Kubernetes API: v1.21
38+
- Distribution (Openshift, Rancher, etc.): Plain K8s
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[chart-name] SUMMARY"
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
## Summary
11+
12+
**As** role name\
13+
**I want** a feature or functionality\
14+
**So that** I get certain business value
15+
16+
## Context
17+
18+
Add more information here. You are completely free regarding form and length.
19+
20+
## Out of Scope
21+
22+
* List aspects that are explicitly not part of this feature
23+
24+
## Further links
25+
26+
* URLs of relevant Git repositories, PRs, Issues, etc.
27+
28+
## Acceptance criteria
29+
30+
* Given a precondition, when an action happens, then expect a result
31+
32+
<!--
33+
If you already have ideas what the requirements are, please list them in given-when-then expressions.
34+
-->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!--
2+
Thank you for contributing to vshn/appcat-charts. Before you submit this PR we'd like to
3+
make sure you are aware of our technical requirements and best practices:
4+
5+
* https://github.com/helm/charts/blob/master/CONTRIBUTING.md#technical-requirements
6+
* https://github.com/helm/helm/tree/master/docs/chart_best_practices
7+
8+
-->
9+
10+
#### What this PR does / why we need it:
11+
12+
* Short summary
13+
14+
#### Checklist
15+
<!-- Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields. -->
16+
- [ ] Chart Version bumped
17+
- [ ] I have run `make docs`
18+
- [ ] Variables are documented in the values.yaml using the format required by [Helm-Docs](https://github.com/norwoodj/helm-docs#valuesyaml-metadata).
19+
- [ ] PR contains the label that identifies the chart, e.g. `chart/<chart-name>`
20+
- [ ] PR contains the label that identifies the type of change, which is one of
21+
[ `bug`, `enhancement`, `documentation`, `change`, `breaking`, `dependency` ]
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"pr_template": "- ${{TITLE}} (#${{NUMBER}})",
3+
"categories": [
4+
{
5+
"title": "## 🚀 Features",
6+
"labels": [
7+
"enhancement"
8+
],
9+
"exhaustive": true
10+
},
11+
{
12+
"title": "## 🛠️ Minor Changes",
13+
"labels": [
14+
"change"
15+
],
16+
"exhaustive": true
17+
},
18+
{
19+
"title": "## 🔎 Breaking Changes",
20+
"labels": [
21+
"breaking"
22+
],
23+
"exhaustive": true
24+
},
25+
{
26+
"title": "## 🐛 Fixes",
27+
"labels": [
28+
"bug"
29+
],
30+
"exhaustive": true
31+
},
32+
{
33+
"title": "## 📄 Documentation",
34+
"labels": [
35+
"documentation"
36+
],
37+
"exhaustive": true
38+
},
39+
{
40+
"title": "## 🔗 Dependency Updates",
41+
"labels": [
42+
"dependency"
43+
],
44+
"exhaustive": true
45+
}
46+
],
47+
"ignore_labels": [
48+
"ignore"
49+
],
50+
"template": "${{CATEGORIZED_COUNT}} changes since ${{FROM_TAG}}\n\n${{CHANGELOG}}",
51+
"tag_resolver": {
52+
"filter": {
53+
"pattern": "<from-workflow>"
54+
},
55+
"transformer": {
56+
"pattern": "<from-workflow>",
57+
"target": "$1"
58+
}
59+
}
60+
}

.github/changelog.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# Tag format from source: refs/tags/chart-1.2.3
4+
5+
# Remove "refs/tags/"
6+
tag="${GITHUB_REF##*/}"
7+
8+
# Remove SemVer at the end
9+
chart=$(echo ${tag} | grep --perl-regexp --only-matching '^([a-zA-Z0-9-]+)(?![0-9.]+)')
10+
11+
tagPattern="${chart}-(.+)"
12+
chartLabel="chart/${chart}"
13+
14+
echo ::group::Configuring changelog generator
15+
jq '.tag_resolver.filter.pattern="'$tagPattern'" | .tag_resolver.transformer.pattern="'$tagPattern'" | .categories[].labels += ["'$chartLabel'"]' \
16+
.github/changelog-configuration.json | tee .github/configuration.json
17+
echo ::endgroup::

.github/helm-docs-footer.gotmpl.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
{{ template "chart.sourcesSection" . }}
3+
4+
{{ template "chart.requirementsSection" . }}
5+
6+
<!---
7+
Common/Useful Link references from values.yaml
8+
-->
9+
[resource-units]: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes
10+
[prometheus-operator]: https://github.com/coreos/prometheus-operator

.github/helm-docs-header.gotmpl.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{{ template "chart.header" . }}
2+
{{ template "chart.deprecationWarning" . }}
3+
4+
{{ template "chart.badgesSection" . }}
5+
6+
{{ template "chart.description" . }}
7+
8+
{{ template "chart.homepageLine" . }}
9+
10+
## Installation
11+
12+
```bash
13+
helm repo add appcat https://charts.appcat.ch
14+
helm install {{ template "chart.name" . }} vshn/{{ template "chart.name" . }}
15+
```

.github/workflows/changelog.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Changelog
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
edit-release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v5
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Prepare changelog config
17+
run: .github/changelog.sh
18+
19+
- name: Build changelog from PRs with labels
20+
id: build_changelog
21+
uses: mikepenz/release-changelog-builder-action@v5
22+
with:
23+
configuration: ".github/configuration.json"
24+
# PreReleases still get a changelog, but the next full release gets a diff since the last full release,
25+
# combining possible changelogs of all previous PreReleases in between.
26+
# PreReleases show a partial changelog since last PreRelease.
27+
ignorePreReleases: "${{ !contains(github.ref, '-rc') }}"
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Update release
32+
uses: tubone24/update_release@v1.3.1
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
with:
36+
body: ${{ steps.build_changelog.outputs.changelog }}

.github/workflows/lint.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
unit-tests:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v5
13+
- name: Determine Go version from go.mod
14+
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
15+
- uses: actions/setup-go@v6
16+
with:
17+
go-version: ${{ env.GO_VERSION }}
18+
- uses: actions/cache@v4
19+
with:
20+
path: ~/go/pkg/mod
21+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
22+
restore-keys: |
23+
${{ runner.os }}-go-
24+
- name: Run all linters
25+
run: make lint
26+
27+
docs:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v5
32+
- name: Generate Chart documentation
33+
run: make docs
34+
- name: Check if documentation is on par with Chart changes
35+
run: git diff --exit-code
36+
37+
chart-versions:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v5
41+
with:
42+
fetch-depth: '0'
43+
- name: Verify chart versions have been updated
44+
run: make lint:versions

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release Charts
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
gh-pages:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v5
14+
with:
15+
fetch-depth: '0'
16+
17+
- name: Configure Git
18+
run: |
19+
git config user.name "$GITHUB_ACTOR"
20+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
21+
- name: Prepare charts
22+
run: make prepare
23+
- name: Run chart-releaser
24+
uses: helm/chart-releaser-action@v1.7.0
25+
with:
26+
charts_dir: charts
27+
charts_repo_url: https://charts.appcat.ch
28+
env:
29+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)