Skip to content

Commit a8c4d15

Browse files
committed
Initial commit
0 parents  commit a8c4d15

Some content is hidden

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

49 files changed

+2250
-0
lines changed

.codeclimate.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: "2"
2+
plugins:
3+
shellcheck:
4+
enabled: true
5+
govet:
6+
enabled: true
7+
gofmt:
8+
enabled: true
9+
golint:
10+
enabled: true
11+
fixme:
12+
enabled: true
13+
exclude_patterns:
14+
- 'config/'
15+
- 'db/'
16+
- 'dist/'
17+
- 'features/'
18+
- '**/node_modules/'
19+
- 'script/'
20+
- 'envtest/'
21+
- '**/spec/'
22+
- '**/test/'
23+
- '**/tests/'
24+
- 'Tests/'
25+
- '**/vendor/'
26+
- '**/*_test.go'
27+
- '**/*.d.ts'
28+
- 'e2e/lib/'
29+
- '**/zz_generated.deepcopy.go'

.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
charset = utf-8
7+
8+
[Makefile]
9+
indent_style = tab
10+
11+
[{*.go, go.mod}]
12+
indent_style = tab
13+
14+
[{*.yml, *.yaml, *.json, *.css, *.js}]
15+
indent_style = space
16+
indent_size = 2

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: 🐛 Bug report
2+
description: Create a report to help us improve 🎉
3+
labels:
4+
- bug
5+
6+
body:
7+
- type: textarea
8+
id: description
9+
attributes:
10+
label: Description
11+
description: A clear and concise description of what the bug is.
12+
validations:
13+
required: true
14+
- type: textarea
15+
id: context
16+
attributes:
17+
label: Additional Context
18+
description: Add any other context about the problem here.
19+
validations:
20+
required: false
21+
- type: textarea
22+
id: logs
23+
attributes:
24+
label: Logs
25+
description: If applicable, add logs to help explain the bug.
26+
render: shell
27+
validations:
28+
required: false
29+
- type: textarea
30+
id: expected_behavior
31+
attributes:
32+
label: Expected Behavior
33+
description: A clear and concise description of what you expected to happen.
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: reproduction_steps
38+
attributes:
39+
label: Steps To Reproduce
40+
description: Describe steps to reproduce the behavior
41+
validations:
42+
required: false
43+
- type: textarea
44+
id: version
45+
attributes:
46+
label: Versions
47+
placeholder: v1.2.3 [, Kubernetes 1.21]
48+
validations:
49+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
blank_issues_enabled: false
2+
3+
# TODO: Redirect support questions
4+
# contact_links:
5+
# - name: ❓ Question
6+
# url: https://github.com/<org>/<repo>/discussions
7+
# about: Ask or discuss with us, we're happy to help 🙋
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: 🚀 Feature request
2+
description: Suggest an idea for this project 💡
3+
labels:
4+
- enhancement
5+
6+
body:
7+
- type: textarea
8+
id: summary
9+
attributes:
10+
label: Summary
11+
value: |
12+
**As** role name\
13+
**I want** a feature or functionality\
14+
**So that** I get certain business value
15+
description: This user story helps us to quickly understand what this idea is about.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: context
20+
attributes:
21+
label: Context
22+
description: Add more information here. You are completely free regarding form and length.
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: out_of_scope
27+
attributes:
28+
label: Out of Scope
29+
description: List aspects that are explicitly not part of this feature
30+
placeholder: |
31+
- ...
32+
- ...
33+
- ...
34+
validations:
35+
required: false
36+
- type: textarea
37+
id: links
38+
attributes:
39+
label: Further links
40+
description: URLs of relevant Git repositories, PRs, Issues, etc.
41+
placeholder: |
42+
- #567
43+
- https://kubernetes.io/docs/reference/
44+
validations:
45+
required: false
46+
- type: textarea
47+
id: acceptance_criteria
48+
attributes:
49+
label: Acceptance Criteria
50+
description: If you already have ideas what the detailed requirements are, please list them below in given-when-then expressions.
51+
placeholder: |
52+
- Given a precondition, when an action happens, then expect a result
53+
54+
```gherkin
55+
Given a precondition
56+
When an action happens
57+
Then expect a result
58+
```
59+
validations:
60+
required: false
61+
- type: textarea
62+
id: implementation_idea
63+
attributes:
64+
label: Implementation Ideas
65+
description: If applicable, shortly list possible implementation ideas
66+
validations:
67+
required: false

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Summary
2+
3+
* Short summary of what's included in the PR
4+
* Give special note to breaking changes
5+
6+
## Checklist
7+
8+
- [ ] Categorize the PR by setting a good title and adding one of the labels:
9+
`bug`, `enhancement`, `documentation`, `change`, `breaking`, `dependency`
10+
as they show up in the changelog
11+
- [ ] Update tests.
12+
- [ ] Link this PR to related issues.
13+
14+
<!--
15+
Remove items that do not apply. For completed items, change [ ] to [x].
16+
17+
NOTE: these things are not required to open a PR and can be done afterwards,
18+
while the PR is open.
19+
-->

.github/changelog-configuration.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"pr_template": "- ${{TITLE}} (#${{NUMBER}})",
3+
"categories": [
4+
{
5+
"title": "## 🚀 Features",
6+
"labels": [
7+
"enhancement"
8+
]
9+
},
10+
{
11+
"title": "## 🛠️ Minor Changes",
12+
"labels": [
13+
"change"
14+
]
15+
},
16+
{
17+
"title": "## 🔎 Breaking Changes",
18+
"labels": [
19+
"breaking"
20+
]
21+
},
22+
{
23+
"title": "## 🐛 Fixes",
24+
"labels": [
25+
"bug"
26+
]
27+
},
28+
{
29+
"title": "## 📄 Documentation",
30+
"labels": [
31+
"documentation"
32+
]
33+
},
34+
{
35+
"title": "## 🔗 Dependency Updates",
36+
"labels": [
37+
"dependency"
38+
]
39+
}
40+
],
41+
"template": "${{CATEGORIZED_COUNT}} changes since ${{FROM_TAG}}\n\n${{CHANGELOG}}"
42+
}

.github/workflows/build.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
push:
8+
branches:
9+
- master
10+
11+
jobs:
12+
go:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Determine Go version from go.mod
18+
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
19+
20+
- uses: actions/setup-go@v3
21+
with:
22+
go-version: ${{ env.GO_VERSION }}
23+
24+
- uses: actions/cache@v3
25+
with:
26+
path: ~/go/pkg/mod
27+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
28+
restore-keys: |
29+
${{ runner.os }}-go-
30+
31+
- name: Run build
32+
run: make build

.github/workflows/docs.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- "*"
9+
10+
jobs:
11+
antora:
12+
runs-on: ubuntu-latest
13+
if: ${{ contains(github.ref, 'tags') }}
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
- name: Configure Git
19+
run: |
20+
git config user.name "Antora via GitHub Actions"
21+
git config user.email "[email protected]"
22+
23+
- name: Parse semver string
24+
id: semver
25+
uses: booxmedialtd/ws-action-parse-semver@v1
26+
with:
27+
input_string: ${{ github.ref }}
28+
version_extractor_regex: '\/v(.*)$'
29+
- name: Set variables
30+
run: |
31+
echo "MINOR_VERSION=${{ steps.semver.outputs.major }}.${{ steps.semver.outputs.minor }}" >> $GITHUB_ENV
32+
echo "BRANCH_NAME=docs/v${{ steps.semver.outputs.major }}.${{ steps.semver.outputs.minor }}" >> $GITHUB_ENV
33+
- name: Set branch name for Prerelease
34+
if: ${{ steps.semver.outputs.prerelease != '' }}
35+
run: echo "BRANCH_NAME=${{ env.BRANCH_NAME }}-rc" >> $GITHUB_ENV
36+
37+
- name: Checkout remote branch if exists
38+
run: git checkout ${{ env.BRANCH_NAME }}
39+
continue-on-error: true
40+
- name: Rebase if possible
41+
run: git rebase ${GITHUB_REF##*/} ${{ env.BRANCH_NAME }}
42+
continue-on-error: true
43+
- name: Create new branch if not existing
44+
run: git switch --create ${{ env.BRANCH_NAME }}
45+
continue-on-error: true
46+
47+
- name: Patch Antora file for Release
48+
run: yq eval 'del(.prerelease) | del (.display_version) | .version = "${{ env.MINOR_VERSION }}"' -i docs/antora.yml
49+
if: ${{ steps.semver.outputs.prerelease == '' }}
50+
- name: Patch Antora file for Prerelease
51+
run: yq eval 'del (.display_version) | .version = "${{ env.MINOR_VERSION }}", .prerelease = "-${{ steps.semver.outputs.prerelease }}"' -i docs/antora.yml
52+
if: ${{ steps.semver.outputs.prerelease != '' }}
53+
54+
- name: Commit
55+
run: git commit --all --message "Update version for Antora"
56+
continue-on-error: true
57+
- name: Push
58+
run: git push --atomic --force --set-upstream origin ${{ env.BRANCH_NAME }}
59+
60+
- name: Cleanup prerelease branch if existing
61+
if: ${{ steps.semver.outputs.prerelease == '' }}
62+
run: git push origin --delete ${{ env.BRANCH_NAME }}-rc
63+
continue-on-error: true
64+
65+
gh-pages:
66+
runs-on: ubuntu-latest
67+
# The needs+if combo will cause this job to wait until Antora versioning is done for tags, but still run on master branch
68+
needs: antora
69+
if: always()
70+
steps:
71+
- uses: actions/checkout@v3
72+
with:
73+
fetch-depth: 0
74+
75+
- name: Configure Git
76+
run: |
77+
git remote set-url origin "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}"
78+
git config user.name "Antora via GitHub Actions"
79+
git config user.email "[email protected]"
80+
81+
- name: Publish documentation
82+
run: make docs-publish

.github/workflows/lint.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Lint
2+
3+
on:
4+
pull_request: {}
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
12+
- name: Determine Go version from go.mod
13+
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
14+
15+
- uses: actions/setup-go@v3
16+
with:
17+
go-version: ${{ env.GO_VERSION }}
18+
19+
- uses: actions/cache@v3
20+
with:
21+
path: ~/go/pkg/mod
22+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
23+
restore-keys: |
24+
${{ runner.os }}-go-
25+
26+
- name: Run linters
27+
run: make lint

0 commit comments

Comments
 (0)