Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix dockerfile #13

Merged
merged 4 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.bin
batch-runner
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.23.4@sha256:485362700179995808807601732516969044780959568521669549157f91742c AS builder
FROM golang:1.23.4 AS builder
WORKDIR /app

ARG VERSION
Expand Down
23 changes: 11 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,18 @@ build:
install:
cp ./.bin/$(NAME) /usr/local/bin/

test: envtest
go test -v ./...

.bin/upx: .bin
wget -nv -O upx.tar.xz https://github.com/upx/upx/releases/download/v3.96/upx-3.96-$(ARCH)_$(OS).tar.xz
tar xf upx.tar.xz
mv upx-3.96-$(ARCH)_$(OS)/upx .bin
rm -rf upx-3.96-$(ARCH)_$(OS)

LOCALBIN = $(shell pwd)/.bin
ENVTEST ?= $(LOCALBIN)/setup-envtest
ENVTEST_K8S_VERSION = 1.31.0
ENVTEST_VERSION ?= release-0.19
.PHONY: envtest
envtest: $(ENVTEST) ## Download setup-envtest locally if necessary.
ENVTEST_VERSION = release-0.19

.PHONY: $(LOCALBIN)
$(LOCALBIN):
mkdir -p $(LOCALBIN)

$(ENVTEST): $(LOCALBIN)
$(call go-install-tool,$(ENVTEST),sigs.k8s.io/controller-runtime/tools/setup-envtest,$(ENVTEST_VERSION))
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest

test: $(ENVTEST)
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use --bin-dir $(LOCALBIN) -p path)" go test -v ./...
1 change: 1 addition & 0 deletions pkg/consumer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func TestSNSToSQSIntegration(t *testing.T) {

// start testEnv
restConfig, err := testEnv.Start()
Expect(err).To(BeNil())

defer testEnv.Stop()

Expand Down
Loading