Skip to content
This repository was archived by the owner on Oct 6, 2024. It is now read-only.

Commit 5f211bd

Browse files
committed
refactor: cookiecutter
1 parent a6aba56 commit 5f211bd

28 files changed

+1525
-1
lines changed

.checkov.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
skip-check:
3+
- CKV_K8S_15 # IfNotPresent should be tolerable
4+
- CKV_K8S_21 # Default Namespace
5+
- CKV_K8S_38 # Service Account token mount
6+
- CKV_K8S_43 # Image hash

.cruft.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"template": "[email protected]:jlec/cookiecutter-general.git",
3+
"commit": "149d69fa35e5dfcffd750c2f2c5fca9ba9b728eb",
4+
"checkout": null,
5+
"context": {
6+
"cookiecutter": {
7+
"email": "[email protected]",
8+
"full_name": "Justin Lecher",
9+
"github_owner": "jlec",
10+
"github_repo": "terraform-provider-turing-pi-bmc",
11+
"project_name": "TF provider for Turing PI BMC",
12+
"project_short_description": "TF provider for Turing PI BMC",
13+
"project_slug": "terraform_provider_turing_pi_bmc",
14+
"project_support_ansible": false,
15+
"project_support_ansible_collection": false,
16+
"project_support_ansible_playbook": false,
17+
"project_support_ansible_role": false,
18+
"project_support_golang": true,
19+
"project_support_nomad": false,
20+
"project_support_packer": false,
21+
"project_support_terraform": true,
22+
"project_support_terraform_module": true,
23+
"project_support_kubernetes": false,
24+
"_copy_without_render": [
25+
"charts/README.md.gotmpl"
26+
],
27+
"_go_app_name": "goer",
28+
"_template": "[email protected]:jlec/cookiecutter-general.git"
29+
}
30+
},
31+
"directory": null
32+
}

.envrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# shellcheck shell=bash
2+
# shellcheck disable=SC1083,SC1090
3+
4+
set -o errexit
5+
6+
source_env_if_exists "$(realpath ../.envrc)"
7+
8+
__RC=(
9+
)
10+
for i in "${__RC[@]}"; do
11+
. "${HOME}/.${i}.rc"
12+
done
13+
unset __RC i

.github/dependabot.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
open-pull-requests-limit: 8
9+
assignees:
10+
- "jlec"
11+
- package-ecosystem: "pip"
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"
15+
open-pull-requests-limit: 8
16+
assignees:
17+
- "jlec"
18+
- package-ecosystem: "gomod"
19+
directory: "/"
20+
schedule:
21+
interval: "weekly"
22+
registries: "*"
23+
open-pull-requests-limit: 8
24+
assignees:
25+
- "jlec"
26+
- package-ecosystem: "terraform"
27+
directory: "/deployment"
28+
schedule:
29+
interval: "weekly"
30+
registries: "*"
31+
open-pull-requests-limit: 8
32+
assignees:
33+
- "jlec"
34+
- package-ecosystem: "terraform"
35+
directory: "/"
36+
schedule:
37+
interval: "weekly"
38+
registries: "*"
39+
open-pull-requests-limit: 8
40+
assignees:
41+
- "jlec"
42+
registries:
43+
terraform-jlec:
44+
type: terraform-registry
45+
url: https://app.terraform.io/
46+
token: ${{ secrets.TFE_TOKEN_DEPENDABOT }}

.github/workflows/cd.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Continuous Delivery
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
# yamllint disable-line rule:empty-values
7+
workflow_dispatch:
8+
9+
push:
10+
branches:
11+
- main
12+
13+
permissions: read-all
14+
15+
jobs:
16+
goreleaser:
17+
name: "GO Releaser"
18+
if: >-
19+
startsWith(github.event.head_commit.message, 'bump:')
20+
uses: jlec/github-actions/.github/workflows/reusable-cd-go.yml@main
21+
permissions:
22+
contents: write
23+
statuses: write
24+
secrets:
25+
pat: ${{ secrets.PAT_GITHUB_TOKEN }}
26+
token: ${{ secrets.GITHUB_TOKEN }}
27+
tfe_release_token: ${{ secrets.TFE_RELEASE_KEY }}
28+
gpg_release_key: ${{ secrets.GPG_RELEASE_KEY }}
29+
release-and-clean:
30+
name: Release the code & clean up
31+
if: >-
32+
startsWith(github.event.head_commit.message, 'bump:')
33+
runs-on: ubuntu-latest
34+
permissions:
35+
contents: write
36+
statuses: write
37+
needs:
38+
- goreleaser
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v3
42+
with:
43+
fetch-depth: 0
44+
ref: ${{ github.ref_name }}
45+
- name: Cleanup action status
46+
uses: ouzi-dev/commit-status-updater@v2
47+
with:
48+
status: "success"
49+
token: ${{ secrets.GITHUB_TOKEN }}
50+
name: "GithubActions - ${GITHUB_WORKFLOW}"
51+
ignoreForks: true

.github/workflows/ci.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
name: Continuous Integration
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
# yamllint disable-line rule:empty-values
7+
workflow_dispatch:
8+
9+
# yamllint disable-line rule:empty-values
10+
pull_request:
11+
12+
push:
13+
branches:
14+
- "*"
15+
tags-ignore:
16+
- "**"
17+
18+
permissions: read-all
19+
20+
jobs:
21+
##############################################################################
22+
#
23+
# Run on everything but Releases and WIP
24+
#
25+
##############################################################################
26+
linting:
27+
if: >-
28+
!startsWith(github.event.head_commit.message, 'bump:') &&
29+
!startsWith(github.event.head_commit.message, 'WIP')
30+
name: "Run Linting against all files"
31+
uses: jlec/github-actions/.github/workflows/reusable-linting.yml@main
32+
go-build-test:
33+
name: "GO Build & Test"
34+
if: >-
35+
${{ github.actor != 'dependabot[bot]' }} &&
36+
!startsWith(github.event.head_commit.message, 'bump:') &&
37+
!startsWith(github.event.head_commit.message, 'WIP')
38+
needs:
39+
- linting
40+
uses: jlec/github-actions/.github/workflows/reusable-ci-go.yml@main
41+
secrets:
42+
pat: ${{ secrets.PAT_GITHUB_TOKEN }}
43+
44+
dependabot:
45+
name: "Handle dependabot PR"
46+
if: >-
47+
${{ github.actor == 'dependabot[bot]' }} &&
48+
!startsWith(github.event.head_commit.message, 'bump:') &&
49+
!startsWith(github.event.head_commit.message, 'WIP')
50+
needs:
51+
- linting
52+
uses: jlec/github-actions/.github/workflows/reusable-pr-dependabot.yml@main
53+
permissions:
54+
contents: write
55+
pull-requests: write
56+
secrets:
57+
token: ${{ secrets.GITHUB_TOKEN }}
58+
59+
ci-generic:
60+
name: "Run generic CI"
61+
if: >-
62+
${{ github.actor != 'dependabot[bot]' }} &&
63+
!startsWith(github.event.head_commit.message, 'bump:') &&
64+
!startsWith(github.event.head_commit.message, 'WIP')
65+
needs:
66+
- go-build-test
67+
- dependabot
68+
- linting
69+
uses: jlec/github-actions/.github/workflows/reusable-ci-generic.yml@main
70+
permissions:
71+
contents: write
72+
pull-requests: write
73+
secrets:
74+
pat: ${{ secrets.PAT_GITHUB_TOKEN }}
75+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)