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 8, 2025
1 parent 71a3d96 commit dfd746d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 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": "."},{"type": "rpm", "path": "."}]'
pipelineSpec:
description: |
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.
Expand Down Expand Up @@ -181,6 +185,8 @@ spec:
value: $(params.output-image).prefetch
- name: ociArtifactExpiresAfter
value: $(params.image-expires-after)
- name: dev-package-managers
value: "true"
runAfter:
- clone-repository
taskRef:
Expand Down
6 changes: 6 additions & 0 deletions .tekton/governance-policy-propagator-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": "."},{"type": "rpm", "path": "."}]'
pipelineSpec:
description: |
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.
Expand Down Expand Up @@ -178,6 +182,8 @@ spec:
value: $(params.output-image).prefetch
- name: ociArtifactExpiresAfter
value: $(params.image-expires-after)
- name: dev-package-managers
value: "true"
runAfter:
- clone-repository
taskRef:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ gosec-scan: GOSEC_ARGS=-exclude G201

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

############################################################
# images section
Expand Down
1 change: 0 additions & 1 deletion build/Dockerfile.rhtap
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ ENV COMPONENT=governance-policy-propagator
ENV REPO_PATH=/go/src/github.com/stolostron/${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 Down

0 comments on commit dfd746d

Please sign in to comment.