-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
32 changed files
with
2,763 additions
and
2,273 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,16 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'gomod' | ||
# Raise pull requests for version updates | ||
# against the `main` branch | ||
target-branch: "main" | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' | ||
- package-ecosystem: 'github-actions' | ||
# Raise pull requests for version updates | ||
# against the `main` branch | ||
target-branch: "main" | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' |
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,84 @@ | ||
name: Keyfactor Bootstrap Workflow | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: [opened, closed, synchronize, edited, reopened] | ||
push: | ||
create: | ||
branches: | ||
- 'release-*.*' | ||
|
||
jobs: | ||
build: | ||
name: Build, Lint, and Test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
# Checkout code | ||
# https://github.com/actions/checkout | ||
- name: Checkout code | ||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
|
||
# Setup GoLang build environment | ||
# https://github.com/actions/setup-go | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | ||
with: | ||
go-version-file: 'go.mod' | ||
cache: true | ||
|
||
# Download dependencies | ||
- run: go mod download | ||
|
||
# Build Go binary | ||
- run: go build -v . | ||
|
||
# Run Go linters | ||
# https://github.com/golangci/golangci-lint-action | ||
- name: Run linters | ||
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0 | ||
with: | ||
version: latest | ||
|
||
# Run Go tests | ||
- name: Run go test | ||
run: go test -v ./... | ||
|
||
integrationtest: | ||
name: Integration Test | ||
needs: build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 20 | ||
steps: | ||
# Checkout code | ||
# https://github.com/actions/checkout | ||
- name: Checkout code | ||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | ||
|
||
# Create a single-node K8s cluster with Kind | ||
# Then, deploy an ephemeral EJBCA and SignServer | ||
- uses: m8rmclaren/ejbca-signserver-k8s@main | ||
with: | ||
deploy-k8s: 'true' | ||
deploy-nginx-ingress: 'true' | ||
deploy-signserver: 'false' | ||
|
||
# Run integration test | ||
- name: Run integration test | ||
run: | | ||
chmod +x test/integrationtest.sh | ||
./test/integrationtest.sh | ||
call-starter-workflow: | ||
uses: keyfactor/actions/.github/workflows/starter.yml@v3 | ||
needs: integrationtest | ||
secrets: | ||
token: ${{ secrets.V2BUILDTOKEN}} | ||
APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}} | ||
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }} | ||
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }} | ||
scan_token: ${{ secrets.SAST_TOKEN }} | ||
docker-user: ${{ secrets.DOCKER_USER }} | ||
docker-token: ${{ secrets.DOCKER_PWD }} | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
run: | ||
# timeout for analysis, e.g. 30s, 5m, default is 1m | ||
timeout: 12m | ||
|
||
skip-dirs: | ||
- testdata$ | ||
- test/mock | ||
|
||
skip-files: | ||
- ".*\\.pb\\.go" | ||
|
||
linters: | ||
enable: | ||
- bodyclose | ||
- durationcheck | ||
- errorlint | ||
- goimports | ||
- revive | ||
- gosec | ||
- misspell | ||
- nakedret | ||
- unconvert | ||
- unparam | ||
- whitespace | ||
- gocritic | ||
- nolintlint | ||
- govet | ||
|
||
linters-settings: | ||
revive: | ||
# minimal confidence for issues, default is 0.8 | ||
confidence: 0.0 |
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
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
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
Oops, something went wrong.