-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ce2629b
Showing
21 changed files
with
3,135 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,42 @@ | ||
################################################################################ | ||
# This file is AUTOGENERATED with <https://github.com/sapcc/go-makefile-maker> # | ||
# Edit Makefile.maker.yaml instead. # | ||
################################################################################ | ||
|
||
name: Checks | ||
"on": | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- '*' | ||
permissions: | ||
checks: write | ||
contents: read | ||
jobs: | ||
checks: | ||
name: Checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
check-latest: true | ||
go-version: "1.22" | ||
- name: Dependency Licenses Review | ||
run: make check-dependency-licenses | ||
- name: Run govulncheck | ||
uses: golang/govulncheck-action@v1 | ||
- name: Check for spelling errors | ||
uses: reviewdog/action-misspell@v1 | ||
with: | ||
exclude: ./vendor/* | ||
fail_on_error: true | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
ignore: importas | ||
reporter: github-check | ||
- name: Check if source code files have license header | ||
run: make check-license-headers |
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,39 @@ | ||
################################################################################ | ||
# This file is AUTOGENERATED with <https://github.com/sapcc/go-makefile-maker> # | ||
# Edit Makefile.maker.yaml instead. # | ||
################################################################################ | ||
|
||
name: CodeQL | ||
"on": | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: '00 07 * * 1' | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
check-latest: true | ||
go-version: "1.22" | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: go | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 |
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,42 @@ | ||
name: Build and run tests | ||
on: [push, pull_request] | ||
env: | ||
GOTOOLCHAIN: local | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.22' | ||
check-latest: true | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
# always uses the latest patch version. | ||
version: v1.55 | ||
args: "--timeout 5m" | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.22' | ||
check-latest: true | ||
|
||
- name: Install Ginkgo CLI | ||
run: go install github.com/onsi/ginkgo/v2/ginkgo@v2.16.0 | ||
|
||
- name: Run tests | ||
run: make build/cover.out |
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,20 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
maintenance-controller | ||
bin/ | ||
testbin/ | ||
build/ | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# IDEs | ||
.vscode | ||
.DS_store |
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,65 @@ | ||
linters: | ||
enable: | ||
- gosec | ||
- unconvert | ||
- goconst | ||
- gocyclo | ||
- asciicheck | ||
- misspell | ||
- lll | ||
- unparam | ||
- dogsled | ||
- nakedret | ||
- prealloc | ||
- gocritic | ||
- godox | ||
- funlen | ||
- whitespace | ||
- gomnd | ||
- godot | ||
- nestif | ||
- nolintlint | ||
- bodyclose | ||
- cyclop | ||
- dogsled | ||
- durationcheck | ||
- errorlint | ||
- exhaustive | ||
- exportloopref | ||
- forcetypeassert | ||
- importas | ||
- makezero | ||
- nilerr | ||
- noctx | ||
- predeclared | ||
- tagliatelle | ||
- revive | ||
- ifshort | ||
- asasalint | ||
- decorder | ||
- errchkjson | ||
- errname | ||
- execinquery | ||
- grouper | ||
- maintidx | ||
- nilnil | ||
- nonamedreturns | ||
- nosprintfhostport | ||
- tenv | ||
- usestdlibvars | ||
disable-all: false | ||
fast: false | ||
linters-settings: | ||
revive: | ||
rules: | ||
- name: unused-parameter | ||
disabled: true | ||
issues: | ||
exclude-rules: | ||
# Exclude some linters from running on tests files. | ||
- path: _test\.go | ||
linters: | ||
- forcetypeassert | ||
- linters: | ||
- lll | ||
source: "^//.*https://.*" # Exclude links from line length check |
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,4 @@ | ||
{"name": "github.com/chzyer/logex", "licenceType": "MIT"} | ||
{"name": "github.com/hashicorp/vault/api/auth/approle", "licenceType": "MPL-2.0"} | ||
{"name": "github.com/jpillora/longestcommon", "licenceType": "MIT"} | ||
{"name": "github.com/spdx/tools-golang", "licenceTextOverrideFile": "vendor/github.com/spdx/tools-golang/LICENSE.code"} |
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 @@ | ||
{ | ||
"allowlist": [ | ||
"Apache-2.0", | ||
"BSD-2-Clause", | ||
"BSD-3-Clause", | ||
"ISC", | ||
"MIT", | ||
"MPL-2.0", | ||
"Unlicense" | ||
] | ||
} |
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,24 @@ | ||
# Build the manager binary | ||
FROM golang:1.22-alpine as builder | ||
|
||
WORKDIR /workspace | ||
ENV GOTOOLCHAIN=local | ||
# Copy the Go Modules manifests | ||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
# cache deps before building and copying source so that we don't need to re-download as much | ||
# and so that source changes don't invalidate our downloaded layer | ||
RUN go mod download | ||
|
||
COPY ./ /workspace/ | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -ldflags="-s -w" -a -o runtime-extension-maintenance-controller main.go | ||
|
||
# Use distroless as minimal base image to package the manager binary | ||
# Refer to https://github.com/GoogleContainerTools/distroless for more details | ||
FROM gcr.io/distroless/static:nonroot | ||
WORKDIR / | ||
LABEL source_repository="https://github.com/sapcc/runtime-extension-maintenance-controller" | ||
COPY --from=builder /workspace/runtime-extension-maintenance-controller . | ||
USER nonroot:nonroot | ||
|
||
ENTRYPOINT ["/runtime-extension-maintenance-controller"] |
Oops, something went wrong.