Skip to content

Commit

Permalink
Enable hermetic builds
Browse files Browse the repository at this point in the history
Signed-off-by: zhujian <[email protected]>
  • Loading branch information
zhujian7 committed Jan 19, 2025
1 parent 9410431 commit 77d6139
Show file tree
Hide file tree
Showing 15 changed files with 80 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .tekton/addon-manager-mce-28-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ metadata:
namespace: crt-redhat-acm-tenant
spec:
params:
- name: hermetic
value: "true"
- name: git-url
value: '{{source_url}}'
- name: revision
Expand Down Expand Up @@ -90,7 +92,7 @@ spec:
- default: ""
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
- default: "false"
- default: "true"
description: Build a source image.
name: build-source-image
type: string
Expand Down
4 changes: 3 additions & 1 deletion .tekton/addon-manager-mce-28-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ metadata:
namespace: crt-redhat-acm-tenant
spec:
params:
- name: hermetic
value: "true"
- name: git-url
value: '{{source_url}}'
- name: revision
Expand Down Expand Up @@ -87,7 +89,7 @@ spec:
- default: ""
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
- default: "false"
- default: "true"
description: Build a source image.
name: build-source-image
type: string
Expand Down
4 changes: 3 additions & 1 deletion .tekton/placement-mce-28-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ metadata:
namespace: crt-redhat-acm-tenant
spec:
params:
- name: hermetic
value: "true"
- name: git-url
value: '{{source_url}}'
- name: revision
Expand Down Expand Up @@ -90,7 +92,7 @@ spec:
- default: ""
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
- default: "false"
- default: "true"
description: Build a source image.
name: build-source-image
type: string
Expand Down
4 changes: 3 additions & 1 deletion .tekton/placement-mce-28-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ metadata:
namespace: crt-redhat-acm-tenant
spec:
params:
- name: hermetic
value: "true"
- name: git-url
value: '{{source_url}}'
- name: revision
Expand Down Expand Up @@ -87,7 +89,7 @@ spec:
- default: ""
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
- default: "false"
- default: "true"
description: Build a source image.
name: build-source-image
type: string
Expand Down
4 changes: 3 additions & 1 deletion .tekton/registration-mce-28-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ metadata:
namespace: crt-redhat-acm-tenant
spec:
params:
- name: hermetic
value: "true"
- name: git-url
value: '{{source_url}}'
- name: revision
Expand Down Expand Up @@ -90,7 +92,7 @@ spec:
- default: ""
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
- default: "false"
- default: "true"
description: Build a source image.
name: build-source-image
type: string
Expand Down
4 changes: 3 additions & 1 deletion .tekton/registration-mce-28-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ metadata:
namespace: crt-redhat-acm-tenant
spec:
params:
- name: hermetic
value: "true"
- name: git-url
value: '{{source_url}}'
- name: revision
Expand Down Expand Up @@ -87,7 +89,7 @@ spec:
- default: ""
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
- default: "false"
- default: "true"
description: Build a source image.
name: build-source-image
type: string
Expand Down
4 changes: 3 additions & 1 deletion .tekton/registration-operator-mce-28-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ metadata:
namespace: crt-redhat-acm-tenant
spec:
params:
- name: hermetic
value: "true"
- name: git-url
value: '{{source_url}}'
- name: revision
Expand Down Expand Up @@ -90,7 +92,7 @@ spec:
- default: ""
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
- default: "false"
- default: "true"
description: Build a source image.
name: build-source-image
type: string
Expand Down
4 changes: 3 additions & 1 deletion .tekton/registration-operator-mce-28-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ metadata:
namespace: crt-redhat-acm-tenant
spec:
params:
- name: hermetic
value: "true"
- name: git-url
value: '{{source_url}}'
- name: revision
Expand Down Expand Up @@ -87,7 +89,7 @@ spec:
- default: ""
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
- default: "false"
- default: "true"
description: Build a source image.
name: build-source-image
type: string
Expand Down
4 changes: 3 additions & 1 deletion .tekton/work-mce-28-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ metadata:
namespace: crt-redhat-acm-tenant
spec:
params:
- name: hermetic
value: "true"
- name: git-url
value: '{{source_url}}'
- name: revision
Expand Down Expand Up @@ -90,7 +92,7 @@ spec:
- default: ""
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
- default: "false"
- default: "true"
description: Build a source image.
name: build-source-image
type: string
Expand Down
4 changes: 3 additions & 1 deletion .tekton/work-mce-28-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ metadata:
namespace: crt-redhat-acm-tenant
spec:
params:
- name: hermetic
value: "true"
- name: git-url
value: '{{source_url}}'
- name: revision
Expand Down Expand Up @@ -87,7 +89,7 @@ spec:
- default: ""
description: Image tag expiration time, time values could be something like 1h, 2d, 3w for hours, days, and weeks, respectively.
name: image-expires-after
- default: "false"
- default: "true"
description: Build a source image.
name: build-source-image
type: string
Expand Down
10 changes: 10 additions & 0 deletions build/Dockerfile.addon.rhtap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ RUN GOOS=${OS} \
make build --warn-undefined-variables

FROM registry.access.redhat.com/ubi9/ubi-minimal:latest

LABEL \
name="multicluster-engine/addon-manager-rhel9" \
summary="addon-manager" \
description="addon-manager" \
io.k8s.description="addon-manager" \
io.k8s.display-name="addon-manager" \
com.redhat.component="multicluster-engine-addon-manager-container" \
io.openshift.tags="data,images"

ENV USER_UID=10001
COPY --from=builder /go/src/open-cluster-management.io/ocm/addon /

Expand Down
10 changes: 10 additions & 0 deletions build/Dockerfile.placement.rhtap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ RUN GOOS=${OS} \
make build --warn-undefined-variables

FROM registry.access.redhat.com/ubi9/ubi-minimal:latest

LABEL \
name="multicluster-engine/placement-rhel9" \
summary="placement" \
description="placement" \
io.k8s.description="placement" \
io.k8s.display-name="placement" \
com.redhat.component="multicluster-engine-placement-container" \
io.openshift.tags="data,images"

ENV USER_UID=10001

COPY --from=builder /go/src/open-cluster-management.io/ocm/placement /
Expand Down
10 changes: 10 additions & 0 deletions build/Dockerfile.registration-operator.rhtap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ RUN GOOS=${OS} \
make build --warn-undefined-variables

FROM registry.access.redhat.com/ubi9/ubi-minimal:latest

LABEL \
name="multicluster-engine/registration-operator-rhel9" \
summary="registration-operator" \
description="registration-operator" \
io.k8s.description="registration-operator" \
io.k8s.display-name="registration-operator" \
com.redhat.component="multicluster-engine-registration-operator-container" \
io.openshift.tags="data,images"

ENV USER_UID=10001

COPY --from=builder /go/src/open-cluster-management.io/ocm/registration-operator /
Expand Down
10 changes: 10 additions & 0 deletions build/Dockerfile.registration.rhtap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ RUN GOOS=${OS} \
make build --warn-undefined-variables

FROM registry.access.redhat.com/ubi9/ubi-minimal:latest

LABEL \
name="multicluster-engine/registration-rhel9" \
summary="registration" \
description="registration" \
io.k8s.description="registration" \
io.k8s.display-name="registration" \
com.redhat.component="multicluster-engine-registration-container" \
io.openshift.tags="data,images"

ENV USER_UID=10001

COPY --from=builder /go/src/open-cluster-management.io/ocm/registration /
Expand Down
10 changes: 10 additions & 0 deletions build/Dockerfile.work.rhtap
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ RUN GOOS=${OS} \
make build --warn-undefined-variables

FROM registry.access.redhat.com/ubi9/ubi-minimal:latest

LABEL \
name="multicluster-engine/work-rhel9" \
summary="work" \
description="work" \
io.k8s.description="work" \
io.k8s.display-name="work" \
com.redhat.component="multicluster-engine-work-container" \
io.openshift.tags="data,images"

ENV USER_UID=10001

COPY --from=builder /go/src/open-cluster-management.io/ocm/work /
Expand Down

0 comments on commit 77d6139

Please sign in to comment.