Skip to content

Commit

Permalink
VEX related improvements in the build process
Browse files Browse the repository at this point in the history
Signed-off-by: Guilherme Macedo <[email protected]>
  • Loading branch information
macedogm committed Jan 9, 2025
1 parent 9c560e9 commit 7c7d76e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ $(SETUP_ENVTEST):

.PHONY: operator
operator:
CGO_ENABLED=0 go build -o bin/gke-operator main.go
CGO_ENABLED=0 go build -ldflags \
"-X github.com/rancher/gke-operator/pkg/version.GitCommit=$(GIT_COMMIT) \
-X github.com/rancher/gke-operator/pkg/version.Version=$(TAG)" \
-o bin/gke-operator .

.PHONY: generate-go
generate-go: $(MOCKGEN)
Expand Down
5 changes: 5 additions & 0 deletions package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ RUN rm -rf /tmp/* /var/tmp/* /usr/share/doc/packages/*
ENV KUBECONFIG="/home/gke-operator/.kube/config"
ENV SSL_CERT_DIR="/etc/rancher/ssl"

# Once this image is migrated to be SLSA compliant and the Go build happens
# inside a build layer, we must pass the version and commit ID to the build,
# similar to what was done in https://github.com/rancher/aks-operator/pull/803 .
# This is just a reference for future changes, because it's needed for our VEX
# work.
COPY bin/gke-operator /usr/bin/
COPY package/entrypoint.sh /usr/bin
RUN chmod +x /usr/bin/entrypoint.sh
Expand Down

0 comments on commit 7c7d76e

Please sign in to comment.