Skip to content

Commit fa3d575

Browse files
author
CodingWizKid
committed
add management stuff
1 parent 799da19 commit fa3d575

12 files changed

+355
-0
lines changed

.githooks/pre-push

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Semgrep
2+
3+
on:
4+
# Scan changed files in PRs, block on new issues only (existing issues ignored)
5+
pull_request: {}
6+
7+
jobs:
8+
semgrep:
9+
name: Scan
10+
runs-on: ubuntu-latest
11+
# Skip any PR created by dependabot to avoid permission issues
12+
if: (github.actor != 'dependabot[bot]')
13+
steps:
14+
# Fetch project source
15+
- uses: actions/checkout@v3
16+
17+
- uses: returntocorp/semgrep-action@v1
18+
with:
19+
config: >- # more at semgrep.dev/explore
20+
p/security-audit
21+
p/secrets
22+
p/ci
23+
p/r2c
24+
p/r2c-ci
25+
p/docker
26+
p/dockerfile
27+
p/command-injection
28+
generateSarif: "1"
29+
30+
# Upload findings to GitHub Advanced Security Dashboard [step 2/2]
31+
- name: Upload SARIF file for GitHub Advanced Security Dashboard
32+
uses: github/codeql-action/upload-sarif@29b1f65c5e92e24fe6b6647da1eaabe529cec70f # v2.3.3
33+
with:
34+
sarif_file: semgrep.sarif
35+
if: always()

.github/ISSUE_TEMPLATE/bug.yaml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Bug Report
2+
description: File a bug report
3+
labels: [ bug, triage ]
4+
assignees:
5+
- patrickkoss
6+
- Slm0n87
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to fill out this bug report! Please fill the form below.
12+
- type: textarea
13+
id: what-happened
14+
attributes:
15+
label: What happened?
16+
description: Also tell us, what did you expect to happen?
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: reproducible
21+
attributes:
22+
label: How can we reproduce this?
23+
description: Please share as much information as possible. Logs, screenshots, etc.
24+
validations:
25+
required: true
26+
- type: checkboxes
27+
id: search
28+
attributes:
29+
label: Search
30+
options:
31+
- label: I did search for other open and closed issues before opening this.
32+
required: true
33+
- type: checkboxes
34+
id: terms
35+
attributes:
36+
label: Code of Conduct
37+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/SchwarzIT/.github/blob/main/CODE_OF_CONDUCT.md)
38+
options:
39+
- label: I agree to follow this project's Code of Conduct
40+
required: true
41+
- type: textarea
42+
id: ctx
43+
attributes:
44+
label: Additional context
45+
description: Anything else you would like to add
46+
validations:
47+
required: false

.github/ISSUE_TEMPLATE/config.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: true

.github/ISSUE_TEMPLATE/feature.yaml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Feature Request
2+
description: Request a new feature and/or enhancement to an existing feature
3+
labels: [enhancement, triage]
4+
assignees:
5+
- patrickkoss
6+
- mgalm
7+
- Slm0n87
8+
body:
9+
- type: markdown
10+
attributes:
11+
value: |
12+
Thanks for taking the time to fill out this feature request! Please fill the form below.
13+
- type: textarea
14+
id: is-it-a-problem
15+
attributes:
16+
label: Is your feature request related to a problem? Please describe.
17+
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: solution
22+
attributes:
23+
label: Describe the solution you'd like
24+
description: A clear and concise description of what you want to happen.
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: alternatives
29+
attributes:
30+
label: Describe alternatives you've considered
31+
description: A clear and concise description of any alternative solutions or features you've considered.
32+
validations:
33+
required: true
34+
- type: checkboxes
35+
id: search
36+
attributes:
37+
label: Search
38+
options:
39+
- label: I did search for other open and closed issues before opening this.
40+
required: true
41+
- type: checkboxes
42+
id: terms
43+
attributes:
44+
label: Code of Conduct
45+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/SchwarzIT/.github/blob/main/CODE_OF_CONDUCT.md)
46+
options:
47+
- label: I agree to follow this project's Code of Conduct
48+
required: true
49+
- type: textarea
50+
id: ctx
51+
attributes:
52+
label: Additional context
53+
description: Anything else you would like to add
54+
validations:
55+
required: false

.github/renovate.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"extends": [
3+
"config:base",
4+
"group:allNonMajor",
5+
":semanticCommits",
6+
":semanticCommitTypeAll(chore)",
7+
":gitSignOff"
8+
],
9+
"dependencyDashboard": false,
10+
"packageRules": [
11+
{
12+
"matchUpdateTypes": ["major", "minor", "patch", "pin", "digest"],
13+
"automerge": true
14+
}
15+
],
16+
"postUpdateOptions": ["gomodTidy", "gomodUpdateImportPaths"]
17+
}

.github/semantic.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# config options found here: https://github.com/Ezard/semantic-prs
2+
3+
# Always validate the PR title, and ignore the commits
4+
titleOnly: true
5+
6+
scopes:
7+
- api
8+
- cli
9+
- ci
10+
- deps
11+
12+
types:
13+
- feat
14+
- fix
15+
- docs
16+
- refactor
17+
- test
18+
- chore
19+
- revert

.github/workflows/main.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
# based on https://github.com/mvdan/github-actions-golang
3+
name: CI
4+
5+
on:
6+
pull_request:
7+
branches: ["main"]
8+
paths-ignore: ["docs/**"]
9+
10+
push:
11+
branches: ["main"]
12+
paths-ignore: ["docs/**"]
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
jobs:
18+
test:
19+
strategy:
20+
matrix:
21+
go-version: [1.20.x]
22+
os: [ubuntu-latest]
23+
runs-on: ${{ matrix.os }}
24+
25+
steps:
26+
- name: Install Go
27+
uses: actions/setup-go@v4
28+
with:
29+
go-version: ${{ matrix.go-version }}
30+
31+
- name: Checkout code
32+
uses: actions/checkout@v3
33+
34+
# cache go modules
35+
- uses: actions/cache@v3
36+
with:
37+
# In order:
38+
# * Module download cache
39+
# * Build cache (Linux)
40+
# * Build cache (Mac)
41+
# * Build cache (Windows)
42+
path: |
43+
~/go/pkg/mod
44+
~/.cache/go-build
45+
~/Library/Caches/go-build
46+
%LocalAppData%\go-build
47+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
48+
restore-keys: |
49+
${{ runner.os }}-go-
50+
51+
- name: Downloads the dependencies
52+
run: make download
53+
54+
- name: Lints all code with golangci-lint
55+
run: make lint
56+
57+
- name: Runs all tests
58+
run: make test

.github/workflows/release.yaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
permissions: read-all
9+
10+
jobs:
11+
release:
12+
permissions:
13+
id-token: write
14+
packages: write
15+
contents: write
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
20+
with:
21+
fetch-depth: 0
22+
- name: Set up Go
23+
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
24+
with:
25+
go-version: 1.19
26+
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
27+
with:
28+
path: |
29+
~/.cache/go-build
30+
~/go/pkg/mod
31+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
32+
restore-keys: |
33+
${{ runner.os }}-go-
34+
- uses: sigstore/cosign-installer@204a51a57a74d190b284a0ce69b44bc37201f343 # v3.0.3
35+
- uses: anchore/sbom-action/download-syft@422cb34a0f8b599678c41b21163ea6088edb2624 # v0.14.1
36+
- name: Run GoReleaser
37+
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0
38+
with:
39+
version: latest
40+
args: release --clean
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/semgrep.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Semgrep
2+
3+
on:
4+
# Scan changed files in PRs, block on new issues only (existing issues ignored)
5+
pull_request: {}
6+
7+
jobs:
8+
semgrep:
9+
name: Scan
10+
runs-on: ubuntu-latest
11+
# Skip any PR created by dependabot to avoid permission issues
12+
if: (github.actor != 'dependabot[bot]')
13+
steps:
14+
# Fetch project source
15+
- uses: actions/checkout@v3
16+
17+
- uses: returntocorp/semgrep-action@v1
18+
with:
19+
config: >- # more at semgrep.dev/explore
20+
p/security-audit
21+
p/secrets
22+
p/ci
23+
p/r2c
24+
p/r2c-ci
25+
p/docker
26+
p/dockerfile
27+
p/command-injection
28+
generateSarif: "1"
29+
30+
# Upload findings to GitHub Advanced Security Dashboard [step 2/2]
31+
- name: Upload SARIF file for GitHub Advanced Security Dashboard
32+
uses: github/codeql-action/upload-sarif@29b1f65c5e92e24fe6b6647da1eaabe529cec70f # v2.3.3
33+
with:
34+
sarif_file: semgrep.sarif
35+
if: always()

CODEOWNERS

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
3+
4+

CONTRIBUTING.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Contributing to External DNS STACKIT Webhook
2+
3+
Welcome and thank you for making it this far and considering contributing to external-dns-stackit-webhook.
4+
We always appreciate any contributions by raising issues, improving the documentation, fixing bugs in the CLI or adding new features.
5+
6+
Before opening a PR please read through this document.
7+
If you want to contribute but don't know how to start or have any questions feel free to reach out to us on [Github Discussions](https://github.com/stackitcloud/stackit-api-manager-cli/discussions). Answering any questions or discussions there is also a great way to contribute to the community.
8+
9+
## Process of making an addition
10+
11+
> Please keep in mind to open an issue whenever you plan to make an addition to features to discuss it before implementing it.
12+
13+
To contribute any code to this repository just do the following:
14+
15+
1. Make sure you have Go's latest version installed
16+
2. Fork this repository
17+
3. Run `make build` to make sure everything's setup correctly
18+
4. Make your changes
19+
> Please follow the [seven rules of greate Git commit messages](https://chris.beams.io/posts/git-commit/#seven-rules)
20+
> and make sure to keep your commits clean and atomic.
21+
> Your PR won't be squashed before merging so the commits should tell a story.
22+
>
23+
> Optional: Sign-off on all Git commits by running `git commit -s`.
24+
> Take a look at the [Gihub Docs](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) for further information.
25+
>
26+
> Add documentation and tests for your addition if needed.
27+
5. Run `make lint test` to ensure your code is ready to be merged
28+
> If any linting issues occur please fix them.
29+
> Using a nolint directive should only be used as a last resort.
30+
6. Open a PR and make sure the CI pipelines succeed.
31+
> Your PR needs to have a semantic title, which can look like: `type(scope) Short Description`
32+
> All available `scopes` & `types` are defined in [semantic.yml](https://github.com/stackitcloud/stackit-api-manager-cli/blob/main/.github/semantic.yml)
33+
>
34+
> A example PR tile for adding a new feature for the CLI would looks like: `cli(feat) Add saving output to file`
35+
7. Wait for one of the maintainers to review your code and react to the comments.
36+
8. After approval merge the PR
37+
9. Thank you for your contribution! :)

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# STACKIT Webhook - ExternalDNS
22

3+
[![GoTemplate](https://img.shields.io/badge/go/template-black?logo=go)](https://github.com/golang-standards/project-layout)
4+
[![CI](https://github.com/stackitcloud/stackit-api-manager-cli/actions/workflows/main.yml/badge.svg)](https://github.com/stackitcloud/external-dns-stackit-webhook/actions/workflows/main.yml)
5+
[![Semgrep](https://github.com/stackitcloud/stackit-api-manager-cli/actions/workflows/semgrep.yml/badge.svg)](https://github.com/stackitcloud/external-dns-stackit-webhook/actions/workflows/semgrep.yml)
6+
[![Go Report Card](https://goreportcard.com/badge/github.com/stackitcloud/stackit-api-manager-cli)](https://goreportcard.com/report/github.com/stackitcloud/external-dns-stackit-webhook)
7+
38
⚠️ CAUTION: This Webhook is designed on an unreleased edition of
49
[ExternalDNS](https://github.com/kubernetes-sigs/external-dns), specifically focusing on the novel integration
510
method via webhooks, as deliberated and constructed

0 commit comments

Comments
 (0)