-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Allow passing `volumes` & `volumeMounts` in values * Format YAML * Updates to CI
- Loading branch information
Showing
6 changed files
with
121 additions
and
148 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
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 |
---|---|---|
|
@@ -3,9 +3,9 @@ name: Release | |
on: | ||
push: | ||
tags: | ||
- "v*" | ||
- "v*" | ||
branches: | ||
- "master" | ||
- "master" | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
@@ -15,60 +15,60 @@ jobs: | |
helm: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Install Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.4.0 | ||
|
||
- name: Run chart-releaser | ||
uses: helm/chart-releaser-action@v1.2.0 | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Install Helm | ||
uses: azure/setup-helm@v3 | ||
with: | ||
version: v3.13.3 | ||
|
||
- name: Run chart-releaser | ||
uses: helm/chart-releaser-action@v1.6.0 | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
releases: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '>=1.21.0' | ||
|
||
- name: Build Binaries | ||
run: | | ||
# Linux | ||
GOOS=linux GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-linux-amd64 make | ||
GOOS=linux GOARCH=arm BUILDPATH=./bin/node-cert-exporter-linux-arm make | ||
GOOS=linux GOARCH=arm64 BUILDPATH=./bin/node-cert-exporter-linux-arm64 make | ||
GOOS=linux GOARCH=386 BUILDPATH=./bin/node-cert-exporter-linux-386 make | ||
# Windows | ||
GOOS=windows GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-windows-amd64.exe make | ||
GOOS=windows GOARCH=arm BUILDPATH=./bin/node-cert-exporter-windows-arm.exe make | ||
GOOS=windows GOARCH=386 BUILDPATH=./bin/node-cert-exporter-windows-386.exe make | ||
# Darwin | ||
GOOS=darwin GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-darwin-amd64 make | ||
GOOS=darwin GOARCH=arm64 BUILDPATH=./bin/node-cert-exporter-darwin-arm64 make | ||
# Freebsd | ||
GOOS=freebsd GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-freebsd-amd64 make | ||
GOOS=freebsd GOARCH=386 BUILDPATH=./bin/node-cert-exporter-freebsd-386 make | ||
GOOS=freebsd GOARCH=arm BUILDPATH=./bin/node-cert-exporter-freebsd-arm make | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
draft: true | ||
artifacts: "./bin/*" | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ">=1.21.0" | ||
|
||
- name: Build Binaries | ||
run: | | ||
# Linux | ||
GOOS=linux GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-linux-amd64 make | ||
GOOS=linux GOARCH=arm BUILDPATH=./bin/node-cert-exporter-linux-arm make | ||
GOOS=linux GOARCH=arm64 BUILDPATH=./bin/node-cert-exporter-linux-arm64 make | ||
GOOS=linux GOARCH=386 BUILDPATH=./bin/node-cert-exporter-linux-386 make | ||
# Windows | ||
GOOS=windows GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-windows-amd64.exe make | ||
GOOS=windows GOARCH=arm BUILDPATH=./bin/node-cert-exporter-windows-arm.exe make | ||
GOOS=windows GOARCH=386 BUILDPATH=./bin/node-cert-exporter-windows-386.exe make | ||
# Darwin | ||
GOOS=darwin GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-darwin-amd64 make | ||
GOOS=darwin GOARCH=arm64 BUILDPATH=./bin/node-cert-exporter-darwin-arm64 make | ||
# Freebsd | ||
GOOS=freebsd GOARCH=amd64 BUILDPATH=./bin/node-cert-exporter-freebsd-amd64 make | ||
GOOS=freebsd GOARCH=386 BUILDPATH=./bin/node-cert-exporter-freebsd-386 make | ||
GOOS=freebsd GOARCH=arm BUILDPATH=./bin/node-cert-exporter-freebsd-arm make | ||
- name: Create Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
draft: true | ||
artifacts: "./bin/*" | ||
|
||
packages: | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
|
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 |
---|---|---|
|
@@ -47,45 +47,18 @@ $(INTDIR): | |
@mkdir -p $@ | ||
$(TBIN)/%: | $(TBIN) ; $(info $(M) building $(PACKAGE)) | ||
$Q tmp=$$(mktemp -d); \ | ||
env GO111MODULE=off GOPATH=$$tmp GOBIN=$(TBIN) $(GO) get $(PACKAGE) \ | ||
env GOBIN=$(TBIN) $(GO) install $(PACKAGE) \ | ||
|| ret=$$?; \ | ||
rm -rf $$tmp ; exit $$ret | ||
#rm -rf $$tmp ; exit $$ret | ||
|
||
GOLINT = $(TBIN)/golint | ||
$(BIN)/golint: PACKAGE=golang.org/x/lint/golint | ||
|
||
GOCYCLO = $(TBIN)/gocyclo | ||
$(TBIN)/gocyclo: PACKAGE=github.com/fzipp/gocyclo/cmd/gocyclo | ||
|
||
INEFFASSIGN = $(TBIN)/ineffassign | ||
$(TBIN)/ineffassign: PACKAGE=github.com/gordonklaus/ineffassign | ||
|
||
MISSPELL = $(TBIN)/misspell | ||
$(TBIN)/misspell: PACKAGE=github.com/client9/misspell/cmd/misspell | ||
|
||
GOLINT = $(TBIN)/golint | ||
$(TBIN)/golint: PACKAGE=golang.org/x/lint/golint | ||
|
||
GOCOV = $(TBIN)/gocov | ||
$(TBIN)/gocov: PACKAGE=github.com/axw/gocov/... | ||
GOCILINT = $(TBIN)/golangci-lint | ||
$(TBIN)/golangci-lint: PACKAGE=github.com/golangci/golangci-lint/cmd/[email protected] | ||
|
||
# Tests | ||
|
||
.PHONY: lint | ||
lint: | $(GOLINT) ; $(info $(M) running golint) @ ## Runs the golint command | ||
$Q $(GOLINT) -set_exit_status $(PKGS) | ||
|
||
.PHONY: gocyclo | ||
gocyclo: | $(GOCYCLO) ; $(info $(M) running gocyclo) @ ## Calculates cyclomatic complexities of functions in Go source code | ||
$Q $(GOCYCLO) -over 25 . | ||
|
||
.PHONY: ineffassign | ||
ineffassign: | $(INEFFASSIGN) ; $(info $(M) running ineffassign) @ ## Detects ineffectual assignments in Go code | ||
$Q $(INEFFASSIGN) ./... | ||
|
||
.PHONY: misspell | ||
misspell: | $(MISSPELL) ; $(info $(M) running misspell) @ ## Finds commonly misspelled English words | ||
$Q $(MISSPELL) . | ||
lint: | $(GOCILINT) ; $(info $(M) running golangci-lint) @ ## Runs static code analysis using golangci-lint | ||
$Q $(GOCILINT) run --timeout=5m | ||
|
||
.PHONY: test | ||
test: ; $(info $(M) running go test) @ ## Runs unit tests | ||
|
@@ -117,7 +90,7 @@ checkfmt: ; $(info $(M) running checkfmt) @ ## Checks if code is formatted with | |
@test "$(shell $(SRC_FILES) gofmt -l)" = "" \ | ||
|| { echo "Code not formatted, please run 'make fmt'"; exit 2; } | ||
|
||
.PHONY: checkfmt | ||
.PHONY: integration-test | ||
integration-test: | $(INTDIR) docker_build ; $(info $(M) running integration tests) @ ## Run integration tests | ||
mkdir -p ${INTDIR}/ssl | ||
openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 \ | ||
|
@@ -169,4 +142,4 @@ version: ## Print version information | |
clean: ; $(info $(M) cleaning) @ ## Cleanup everything | ||
@rm -rfv $(BIN) | ||
@rm -rfv $(TBIN) | ||
@rm -rfv $(CURDIR)/test | ||
@rm -rfv $(CURDIR)/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
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