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

[v2.8] VEX related improvements in the build process #786

Merged
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
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
Loading