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

Not running govet or gofmt in Dockerfile builds #1283

Merged
merged 2 commits into from
Dec 7, 2020
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: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ COPY pkg/ pkg/
COPY .git/ .git/

# Build
RUN VERSION=${BUILD_VERSION} make manager
RUN VERSION=${BUILD_VERSION} make manager-dockerfile

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.adapter
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ COPY .git/ .git/
RUN mkdir -p /apiserver.local.config/certificates && chmod -R 777 /apiserver.local.config

# Build
RUN VERSION=${BUILD_VERSION} make adapter
RUN VERSION=${BUILD_VERSION} make adapter-dockerfile

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,28 @@ docker-build:

# Build KEDA Operator binary
.PHONY: manager
manager: generate gofmt govet
manager: manager-dockerfile gofmt govet

# Build the manager inside the Dockerfile. This elides
# the gofmt and govet commands. Since code quality checks
# are already in CI, we don't need to run them every
# time we build the image
.PHONY: manager-dockerfile
manager-dockerfile: generate
${GO_BUILD_VARS} go build \
-ldflags "-X=github.com/kedacore/keda/version.GitCommit=$(GIT_COMMIT) -X=github.com/kedacore/keda/version.Version=$(VERSION)" \
-o bin/keda main.go

# Build KEDA Metrics Server Adapter binary
.PHONY: adapter
adapter: generate gofmt govet
adapter: adapter-dockerfile gofmt govet

# Build the adapter inside the Dockerfile. This elides
# the gofmt and govet commands. Since code quality checks
# are already in CI, we don't need to run them every
# time we build the image
.PHONY: adapter-dockerfile
adapter-dockerfile: generate
${GO_BUILD_VARS} go build \
-ldflags "-X=github.com/kedacore/keda/version.GitCommit=$(GIT_COMMIT) -X=github.com/kedacore/keda/version.Version=$(VERSION)" \
-o bin/keda-adapter adapter/main.go
Expand Down