Skip to content

Commit

Permalink
Merge pull request rancher#1068 from macedogm/vex-go-build-improvements
Browse files Browse the repository at this point in the history
VEX related improvements in the build process
  • Loading branch information
yiannistri authored Jan 9, 2025
2 parents 550fce8 + 003319c commit 743322d
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 @@ -76,7 +76,10 @@ $(SETUP_ENVTEST):

.PHONY: operator
operator:
CGO_ENABLED=0 go build -o bin/eks-operator main.go
CGO_ENABLED=0 go build -ldflags \
"-X github.com/rancher/eks-operator/pkg/version.GitCommit=$(GIT_COMMIT) \
-X github.com/rancher/eks-operator/pkg/version.Version=$(TAG)" \
-o bin/eks-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/eks-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/eks-operator /usr/bin/
COPY package/entrypoint.sh /usr/bin
RUN chmod +x /usr/bin/entrypoint.sh
Expand Down

0 comments on commit 743322d

Please sign in to comment.