Skip to content

Commit d519aa3

Browse files
feat: Initial commit 🎉 (#8)
1 parent 91c4675 commit d519aa3

File tree

127 files changed

+16251
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+16251
-1
lines changed

Diff for: .cliff.toml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# git-cliff ~ default configuration file
2+
# https://git-cliff.org/docs/configuration
3+
#
4+
# Lines starting with "#" are comments.
5+
# Configuration options are organized into tables and keys.
6+
# See documentation for more information on available options.
7+
8+
[changelog]
9+
# changelog header
10+
header = """
11+
# Changelog\n
12+
All notable changes to this project will be documented in this file.\n
13+
"""
14+
# template for the changelog body
15+
# https://tera.netlify.app/docs
16+
body = """
17+
{% if version %}\
18+
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
19+
{% else %}\
20+
## [unreleased]
21+
{% endif %}\
22+
{% for group, commits in commits | group_by(attribute="group") %}
23+
### {{ group | upper_first }}
24+
{% for commit in commits %}
25+
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}\
26+
{% endfor %}
27+
{% endfor %}\n
28+
"""
29+
# remove the leading and trailing whitespace from the template
30+
trim = true
31+
# changelog footer
32+
footer = """
33+
"""
34+
35+
[git]
36+
# parse the commits based on https://www.conventionalcommits.org
37+
conventional_commits = true
38+
# filter out the commits that are not conventional
39+
filter_unconventional = true
40+
# process each line of a commit as an individual commit
41+
split_commits = false
42+
# regex for preprocessing the commit messages
43+
commit_preprocessors = [
44+
# { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/orhun/git-cliff/issues/${2}))"}, # replace issue numbers
45+
]
46+
# regex for parsing and grouping commits
47+
commit_parsers = [
48+
{ message = "^feat", group = "Features" },
49+
{ message = "^fix", group = "Bug Fixes" },
50+
{ message = "^doc", group = "Documentation" },
51+
{ message = "^perf", group = "Performance" },
52+
{ message = "^refactor", group = "Refactor" },
53+
{ message = "^style", group = "Styling" },
54+
{ message = "^test", group = "Testing" },
55+
{ message = "^chore\\(release\\): prepare for", skip = true },
56+
{ message = "^chore", group = "Miscellaneous Tasks" },
57+
{ body = ".*security", group = "Security" },
58+
]
59+
# protect breaking changes from being skipped due to matching a skipping commit_parser
60+
protect_breaking_commits = false
61+
# filter out the commits that are not matched by commit parsers
62+
filter_commits = false
63+
# glob pattern for matching git tags
64+
tag_pattern = "v[0-9]*"
65+
# regex for skipping tags
66+
skip_tags = "v0.1.0-beta.1"
67+
# regex for ignoring tags
68+
ignore_tags = ""
69+
# sort the tags topologically
70+
topo_order = false
71+
# sort the commits inside sections by oldest/newest order
72+
sort_commits = "oldest"
73+
# limit the number of commits included in the changelog.
74+
# limit_commits = 42

Diff for: .commitlintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

Diff for: .editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
7+
[*.{json,json5,yml,yaml,cue}]
8+
charset = utf-8
9+
indent_style = space
10+
indent_size = 2

Diff for: .gitattributes

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/.yarn/** linguist-vendored
2+
/.yarn/releases/* binary
3+
/.yarn/plugins/**/* binary
4+
/.pnp.* binary linguist-generated

Diff for: .github/ISSUE_TEMPLATE/bug_issue_template.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Bug Report
2+
3+
### Description
4+
Report a bug encountered while operating `launchpad-namespaces`.
5+
6+
### What happened?
7+
Please provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner.
8+
9+
### What did you expect to happen?
10+
A clear and concise description of what you expected to happen.
11+
12+
### Environment
13+
- Operating System:
14+
- Kubernetes Version:
15+
- Helm Version:
16+
- Namespace Affected:
17+
- Any other relevant environment details:
18+
19+
### How can we reproduce it (as minimally and precisely as possible)?
20+
1.
21+
2.
22+
23+
### Possible Solution (optional)
24+
If you have any suggestions on how to fix the bug, please provide them.
25+
26+
### Additional Information (optional)
27+
Any additional information or context that may be helpful in understanding or resolving the issue.

Diff for: .github/ISSUE_TEMPLATE/new_feature_issue_template.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
## Feature Request
2+
3+
### Description
4+
A clear and concise description of the new feature you are requesting.
5+
6+
### Problem or Motivation
7+
Explain the problem or motivation behind the feature request. What issue or need does it address?
8+
9+
### Expected Benefits
10+
Explain the potential benefits or positive impact that implementing this feature would have.
11+
12+
### Additional Information
13+
Any additional information or context that may be helpful in understanding your feature request.
14+
15+
### Related Issues (optional)
16+
If there are any related issues or pull requests, please mention them here.
17+
18+
### Contribution (optional)
19+
If you are interested in contributing to the development of this feature, please let us know.
20+
21+
### Implementation Suggestions (optional)
22+
If you have any suggestions on how to implement this feature or specific technical considerations, please provide them.
23+
24+
### Other Comments (optional)
25+
Any other comments, ideas, or thoughts you'd like to add.
26+

Diff for: .github/pull_request_template.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### Description
2+
*Add a brief overview of the changes and motivation behind them here*
3+
4+
### Issue link (if applicable)
5+
[Link to issue]()
6+
7+
### Testing
8+
*In case that's relevant, please add a note about if and how these changes were tested*

Diff for: .github/renovate.json5

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"github>graphops/renovate-config"
5+
],
6+
7+
"separateMajorMinor": false,
8+
9+
"ignorePaths": [
10+
],
11+
12+
"ignoreDeps": [
13+
],
14+
15+
"enabledManagers": ["regex"],
16+
17+
"regexManagers": [
18+
{
19+
"fileMatch": ["(^|/)helmfile.yaml$"],
20+
"matchStrings": [
21+
".*:\\n[\\s]*?chart:[\\s]?(?<depType>.*)\\/(?<packageName>.*)\\n[\\s]*version:[\\s]?(?<currentValue>[v]?\\d+\\.\\d+\\.\\d+)\\n"
22+
],
23+
"depNameTemplate": "{{{depType}}}/{{{packageName}}}",
24+
"packageNameTemplate": "{{{packageName}}}",
25+
"datasourceTemplate": "helm"
26+
}
27+
],
28+
29+
"packageRules": [
30+
// Group dependency update PRs per namespace
31+
{
32+
"description": "Group dependencies",
33+
"matchPaths": ["*/**"],
34+
"groupName": "{{{ parentDir }}} dependencies",
35+
"groupSlug": "{{{ parentDir }}}"
36+
}
37+
38+
// Helm Chart repositories
39+
{
40+
"matchDepPatterns": "graphops\/.*",
41+
"registryUrls": ["https://graphops.github.io/launchpad-charts"]
42+
},
43+
{
44+
"matchDepPatterns": "ingress-nginx\/.*",
45+
"registryUrls": ["https://kubernetes.github.io/ingress-nginx"]
46+
},
47+
{
48+
"matchDepPatterns": "vouch\/.*",
49+
"registryUrls": ["https://vouch.github.io/helm-charts/"]
50+
},
51+
{
52+
"matchDepPatterns": "jetstack\/.*",
53+
"registryUrls": ["https://charts.jetstack.io"]
54+
},
55+
{
56+
"matchDepPatterns": "prometheus-community\/.*",
57+
"registryUrls": ["https://prometheus-community.github.io/helm-charts"]
58+
},
59+
{
60+
"matchDepPatterns": "deliveryhero\/.*",
61+
"registryUrls": ["https://charts.deliveryhero.io"]
62+
},
63+
{
64+
"matchDepPatterns": "grafana\/.*",
65+
"registryUrls": ["https://grafana.github.io/helm-charts"]
66+
},
67+
{
68+
"matchDepPatterns": "postgres-operator-charts\/.*",
69+
"registryUrls": ["https://opensource.zalando.com/postgres-operator/charts/postgres-operator"]
70+
},
71+
{
72+
"matchDepPatterns": "sealed-secrets\/.*",
73+
"registryUrls": ["https://bitnami-labs.github.io/sealed-secrets"]
74+
},
75+
{
76+
"matchDepPatterns": "openebs\/.*",
77+
"registryUrls": ["https://openebs.github.io/charts"]
78+
},
79+
{
80+
"matchDepPatterns": "openebs-zfs-localpv\/.*",
81+
"registryUrls": ["https://openebs.github.io/zfs-localpv"]
82+
},
83+
{
84+
"matchDepPatterns": "openebs-monitoring\/.*",
85+
"registryUrls": ["https://openebs.github.io/monitoring/"]
86+
}
87+
]
88+
}

Diff for: .github/workflows/make-release-notes.yaml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Make Release Notes
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
tag:
7+
type: string
8+
required: true
9+
description: "What tag to release"
10+
11+
jobs:
12+
changelog:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
ref: "${{ inputs.tag }}"
20+
21+
- name: Configure Git
22+
run: |
23+
git config user.name "${{ github.actor }}"
24+
git config user.email "${{ github.actor}}@users.noreply.github.com"
25+
26+
- name: Setup node
27+
uses: actions/setup-node@v3
28+
29+
- name: Yarn install
30+
run: |
31+
yarn install
32+
33+
- name: Get namespace
34+
id: namespace
35+
run: |
36+
name="$(echo ${{ inputs.tag }} | sed -E 's/(.*)-v[[:digit:]]+.[[:digit:]]+.[[:digit:]]+/\1/g')"
37+
echo "name=$name" >> $GITHUB_OUTPUT
38+
39+
- name: Generate release notes
40+
env:
41+
NAMESPACE: ${{ steps.namespace.outputs.name }}
42+
run: |
43+
export GIT_CLIFF__GIT__TAG_PATTERN="$NAMESPACE-v*"
44+
export GIT_CLIFF__GIT__IGNORE_TAGS="$NAMESPACE-v[0-9]+.[0-9]+.[0-9]+-.*"
45+
46+
yarn git-cliff -c ".cliff.toml" --include-path "$NAMESPACE/**" -o "RELEASE-NOTES.md" -s all -t "${{ inputs.tag }}"
47+
48+
- uses: actions/upload-artifact@v3
49+
with:
50+
name: "${{ inputs.tag }}.release-notes"
51+
path: RELEASE-NOTES.md

Diff for: .github/workflows/make-release.yaml

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Make Release
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
tag:
7+
type: string
8+
required: true
9+
description: "What tag to release?"
10+
workflow_dispatch:
11+
inputs:
12+
tag:
13+
type: string
14+
required: true
15+
description: "What tag to release>"
16+
17+
18+
jobs:
19+
init:
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: write # for creating releases
23+
outputs:
24+
name: ${{ steps.parse_tag.outputs.name }}
25+
version: ${{ steps.parse_tag.outputs.version }}
26+
fullversion: ${{ steps.parse_tag.outputs.fullversion }}
27+
prerelease: ${{ steps.parse_tag.outputs.prerelease }}
28+
tag: ${{ steps.parse_tag.outputs.tag }}
29+
steps:
30+
# TODO: build an action leveraging semver (npm), which parses this robustly and offer more outputs
31+
- name: Parse tag
32+
id: parse_tag
33+
run: |
34+
if [ -n "${{ inputs.tag }}" ]; then
35+
tag="${{ inputs.tag }}"
36+
else
37+
tag="${{ github.ref_name }}"
38+
fi
39+
echo "tag=$tag" >> $GITHUB_OUTPUT
40+
name=$(echo "$tag" | sed -r 's/^(.*)-v([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)(-canary.)?([[:digit:]]+)?$/\1/g')
41+
echo "name=$name" >> $GITHUB_OUTPUT
42+
version=$(echo "${{ inputs.tag }}" | sed -r 's/^(.*)-v([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)(-canary.)?([[:digit:]]+)?$/\2/g')
43+
echo "version=$version" >> $GITHUB_OUTPUT
44+
prerelease=$(echo "${{ inputs.tag }}" | sed -r 's/^(.*)-v([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+)(-canary.)?([[:digit:]]+)?$/\4/g')
45+
echo "prerelease=$prerelease" >> $GITHUB_OUTPUT
46+
fullversion=$(echo "${{ inputs.tag }}" | sed -r 's/^(.*)-v([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(-canary\.[[:digit:]]+)?)/\2/g')
47+
echo "fullversion=$fullversion" >> $GITHUB_OUTPUT
48+
49+
call-release-notes:
50+
uses: ./.github/workflows/make-release-notes.yaml
51+
with:
52+
tag: ${{ github.ref_name }}
53+
54+
release:
55+
needs:
56+
- init
57+
- call-release-notes
58+
runs-on: ubuntu-latest
59+
permissions:
60+
contents: write # for creating releases
61+
steps:
62+
- name: Checkout
63+
uses: actions/checkout@v3
64+
with:
65+
fetch-depth: 0
66+
67+
- name: Configure Git
68+
run: |
69+
git config user.name "${{ github.actor }}"
70+
git config user.email "${{ github.actor}}@users.noreply.github.com"
71+
72+
- uses: actions/download-artifact@v3
73+
with:
74+
name: "${{ needs.init.outputs.tag }}.release-notes"
75+
path: "."
76+
77+
- name: Generate namespace release
78+
id: release
79+
run: |
80+
tar -czf ${{ needs.init.outputs.tag }}.tar.gz "RELEASE-NOTES.md" "${{ needs.init.outputs.name}}/"
81+
82+
- name: Upload artifact
83+
uses: actions/upload-artifact@v3
84+
with:
85+
name: "${{ needs.init.outputs.tag }}.release"
86+
path: "${{ needs.init.outputs.tag }}.tar.gz"
87+
88+
- name: Create release
89+
run: |
90+
if [ -z "${{ needs.init.outputs.prerelease }}" ]; then
91+
gh release create -d -t ${{ needs.init.outputs.tag }} --verify-tag -F RELEASE-NOTES.md ${{ needs.init.outputs.tag }} ${{ needs.init.outputs.tag }}.tar.gz
92+
93+
else
94+
gh release create -t ${{ needs.init.outputs.tag }} --verify-tag --prerelease -F RELEASE-NOTES.md ${{ needs.init.outputs.tag }} ${{ needs.init.outputs.tag }}.tar.gz
95+
fi
96+
97+
env:
98+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)