-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
garm-provider-k8s is a plugin for the cloudbase/garm project in order to spin up GitHub Action Runners on kubernetes. Co-authored-by: Mario Constanti <[email protected]> Co-authored-by: Michael Kuhnt <[email protected]> Co-authored-by: Heiko Kast <[email protected]>
- Loading branch information
Showing
47 changed files
with
5,187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Bug Report | ||
description: Report a bug encountered while using garm operator | ||
body: | ||
- type: textarea | ||
id: problem | ||
attributes: | ||
label: What steps did you take and what happened? | ||
description: | | ||
Please provide as much info as possible about the problem. | ||
placeholder: "A clear and concise description on how to REPRODUCE the bug." | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: expected | ||
attributes: | ||
label: What did you expect to happen? | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: garmVersion | ||
attributes: | ||
label: garm version | ||
placeholder: "The version of garm used in your environment" | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: garmProviderK8sVersion | ||
attributes: | ||
label: garm-provider-k8s version | ||
placeholder: "The version of garm-provider-k8s used in your environment." | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: kubeVersion | ||
attributes: | ||
label: Kubernetes version | ||
placeholder: "$kubectl version" | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: Anything else you would like to add? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Feature Request | ||
description: Request a feature you want to see in the garm-provider-k8s | ||
body: | ||
- type: textarea | ||
id: feature | ||
attributes: | ||
label: What is the feature you would like to have? | ||
description: | | ||
Please provide as much info as possible about the feature. | ||
placeholder: "I would like to have ..." | ||
validations: | ||
required: true | ||
|
||
- type: textarea | ||
id: additional | ||
attributes: | ||
label: Anything else you would like to add? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: build | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: lint and test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21.4' | ||
|
||
- name: make lint | ||
run: make golangci-lint && GOLANGCI_LINT_EXTRA_ARGS=--timeout=1h make lint | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 14 | ||
|
||
- name: make build | ||
run: make build | ||
|
||
- name: make verify-license | ||
run: make verify-license | ||
|
||
- name: make test | ||
run: make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# SPDX-License-Identifier: MIT | ||
# Jobs to run Blackduck based FOSS scan | ||
name: FOSS Scan | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
foss-scan: | ||
strategy: | ||
max-parallel: 2 | ||
name: foss-scan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go 1.21.4 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21.4' | ||
id: go | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Synopsys Detect | ||
run: | | ||
GITHUB_REF="$(echo $GITHUB_REF_NAME | tr ':/' '_')" | ||
BLACKDUCK_SCAN_VERSION_NAME="${GITHUB_REF}" | ||
export BLACKDUCK_SCAN_VERSION_NAME | ||
# create the tmp directory as we also do during the release process | ||
mkdir -p tmp | ||
./hack/scripts/foss-scan.sh | ||
env: | ||
BLACKDUCK_URL: ${{ secrets.BLACKDUCK_URL }} | ||
BLACKDUCK_PROJECT_NAME: ${{ secrets.BLACKDUCK_PROJECT_NAME }} | ||
BLACKDUCK_TOKEN: ${{ secrets.BLACKDUCK_TOKEN }} | ||
|
||
- name: Archive foss scan notices report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: 3RD_PARTY_LICENSES.txt | ||
path: tmp/Black_Duck_Notices_Report.txt | ||
|
||
- name: Archive foss scan risk report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: foss-scan-risk-report | ||
path: tmp/BlackDuck_RiskReport.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: release | ||
|
||
on: | ||
push: | ||
# run only against tags | ||
tags: | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
id-token: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21.4' | ||
|
||
- name: Synopsys Detect | ||
run: | | ||
GITHUB_REF="$(echo $GITHUB_REF_NAME | tr ':/' '_')" | ||
BLACKDUCK_SCAN_VERSION_NAME="${GITHUB_REF}_${GITHUB_SHA}" | ||
export BLACKDUCK_SCAN_VERSION_NAME | ||
# create the tmp directory as we also do during the release process | ||
mkdir -p tmp | ||
./hack/scripts/foss-scan.sh | ||
mv tmp/Black_Duck_Notices_Report.txt tmp/3RD_PARTY_LICENSES.txt | ||
env: | ||
BLACKDUCK_URL: ${{ secrets.BLACKDUCK_URL }} | ||
BLACKDUCK_PROJECT_NAME: ${{ secrets.BLACKDUCK_PROJECT_NAME }} | ||
BLACKDUCK_TOKEN: ${{ secrets.BLACKDUCK_TOKEN }} | ||
|
||
- name: release | ||
run: make release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# SPDX-License-Identifier: MIT | ||
|
||
.idea | ||
/bin/ | ||
/hack/bin/garm-provider-k8s | ||
/hack/local-development/kubernetes/configmap.yaml | ||
/hack/local-development/kubernetes/garm-operator-all.yaml | ||
|
||
# Ignore all files in the tmp directory | ||
# primarly used during the release process | ||
tmp/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# SPDX-License-Identifier: MIT | ||
|
||
linters: | ||
disable-all: true | ||
fast: false | ||
enable: | ||
- gci | ||
- goconst | ||
- gocritic | ||
- gocyclo | ||
- gofmt | ||
- gofumpt | ||
- goimports | ||
- godox | ||
- govet | ||
- gosec | ||
- importas | ||
- ineffassign | ||
- loggercheck | ||
- misspell | ||
- nakedret | ||
- nilerr | ||
- predeclared | ||
- promlinter | ||
- revive | ||
- staticcheck | ||
- tagliatelle | ||
- unconvert | ||
- unused | ||
- wastedassign | ||
- whitespace | ||
|
||
linters-settings: | ||
gci: | ||
sections: | ||
- standard | ||
- default | ||
- prefix(github.com/mercedes-benz/garm-provider-k8s) | ||
|
||
goimports: | ||
local-prefixes: github.com/mercedes-benz/garm-provider-k8s | ||
|
||
importas: | ||
no-unaliased: false | ||
alias: | ||
- pkg: k8s.io/api/core/v1 | ||
alias: corev1 | ||
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1 | ||
alias: metav1 | ||
|
||
loggercheck: | ||
klog: true | ||
zap: false | ||
require-string-key: true | ||
no-printf-like: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# SPDX-License-Identifier: MIT | ||
|
||
project_name: garm-provider-k8s | ||
before: | ||
hooks: | ||
- go mod tidy | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
main: ./cmd/garm-provider-k8s | ||
|
||
archives: | ||
- format: tar.gz | ||
# this name template makes the OS and Arch compatible with the results of uname. | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
{{- if .Arm }}v{{ .Arm }}{{ end }} | ||
checksum: | ||
name_template: "checksums.txt" | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
use: github | ||
groups: | ||
- title: "✨ Features" | ||
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' | ||
order: 0 | ||
- title: "🐛 Bug fixes" | ||
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' | ||
order: 1 | ||
- title: "📚 Documentation" | ||
regexp: '^.*?docs(\([[:word:]]+\))??!?:.+$' | ||
order: 2 | ||
- title: "🌱 Others" | ||
order: 999 | ||
filters: | ||
exclude: | ||
- "^test:" | ||
release: | ||
github: | ||
owner: mercedes-benz | ||
name: garm-provider-k8s | ||
prerelease: auto | ||
extra_files: | ||
- glob: tmp/3RD_PARTY_LICENSES.txt | ||
- glob: tmp/BlackDuck_RiskReport.pdf | ||
header: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# SPDX-License-Identifier: MIT | ||
|
||
* @bavarianbidi @maigl @rafalgalaw @H777K |
Oops, something went wrong.