Skip to content

Commit

Permalink
Enable hermetic builds
Browse files Browse the repository at this point in the history
Signed-off-by: Dale Haiducek <[email protected]>
  • Loading branch information
dhaiducek committed Jan 10, 2025
1 parent b8b1707 commit 630ca6f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ spec:
value: build/Dockerfile.rhtap
- name: path-context
value: .
- name: hermetic
value: "true"
- name: prefetch-input
value: '[{"type": "gomod", "path": "."}]'
pipelineSpec:
description: |
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.
Expand Down
4 changes: 4 additions & 0 deletions .tekton/governance-policy-framework-addon-acm-213-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ spec:
value: build/Dockerfile.rhtap
- name: path-context
value: .
- name: hermetic
value: "true"
- name: prefetch-input
value: '[{"type": "gomod", "path": "."}]'
pipelineSpec:
description: |
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ test-dependencies: envtest kubebuilder

.PHONY: build
build:
CGO_ENABLED=1 go build -o build/_output/bin/$(IMG) ./
CGO_ENABLED=1 go build -mod=readonly -o build/_output/bin/$(IMG) ./

.PHONY: run
run:
Expand Down
3 changes: 0 additions & 3 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,4 @@ RUN /usr/local/bin/user_setup

ENTRYPOINT ["/usr/local/bin/entrypoint"]

RUN microdnf update -y && \
microdnf clean all

USER ${USER_UID}
4 changes: 0 additions & 4 deletions build/Dockerfile.rhtap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ ENV COMPONENT=governance-policy-framework-addon
ENV REPO_PATH=/go/src/github.com/open-cluster-management-io/${COMPONENT}
WORKDIR ${REPO_PATH}
COPY . .
RUN go mod vendor
RUN make build

# Stage 2: Copy the binaries from the image builder to the base image
Expand All @@ -27,7 +26,4 @@ RUN /usr/local/bin/user_setup

ENTRYPOINT ["/usr/local/bin/entrypoint"]

RUN microdnf update -y && \
microdnf clean all

USER ${USER_UID}

0 comments on commit 630ca6f

Please sign in to comment.