From 95349145f5979b02a6d5aef72c0d043be23b4a75 Mon Sep 17 00:00:00 2001 From: zhujian Date: Thu, 16 Jan 2025 22:17:50 +0800 Subject: [PATCH] Enable hermetic builds Signed-off-by: zhujian --- .tekton/addon-manager-mce-28-pull-request.yaml | 4 +++- .tekton/addon-manager-mce-28-push.yaml | 4 +++- .tekton/placement-mce-28-pull-request.yaml | 4 +++- .tekton/placement-mce-28-push.yaml | 4 +++- .tekton/registration-mce-28-pull-request.yaml | 4 +++- .tekton/registration-mce-28-push.yaml | 4 +++- .tekton/registration-operator-mce-28-pull-request.yaml | 4 +++- .tekton/registration-operator-mce-28-push.yaml | 4 +++- .tekton/work-mce-28-pull-request.yaml | 4 +++- .tekton/work-mce-28-push.yaml | 4 +++- build/Dockerfile.addon.rhtap | 10 ++++++++++ build/Dockerfile.placement.rhtap | 10 ++++++++++ build/Dockerfile.registration-operator.rhtap | 10 ++++++++++ build/Dockerfile.registration.rhtap | 10 ++++++++++ build/Dockerfile.work.rhtap | 10 ++++++++++ 15 files changed, 80 insertions(+), 10 deletions(-) diff --git a/.tekton/addon-manager-mce-28-pull-request.yaml b/.tekton/addon-manager-mce-28-pull-request.yaml index fe13785fb..1bb67423d 100644 --- a/.tekton/addon-manager-mce-28-pull-request.yaml +++ b/.tekton/addon-manager-mce-28-pull-request.yaml @@ -17,6 +17,8 @@ metadata: namespace: crt-redhat-acm-tenant spec: params: + - name: hermetic + value: "true" - name: git-url value: '{{source_url}}' - name: revision @@ -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 diff --git a/.tekton/addon-manager-mce-28-push.yaml b/.tekton/addon-manager-mce-28-push.yaml index f80e9a59b..c5f591579 100644 --- a/.tekton/addon-manager-mce-28-push.yaml +++ b/.tekton/addon-manager-mce-28-push.yaml @@ -16,6 +16,8 @@ metadata: namespace: crt-redhat-acm-tenant spec: params: + - name: hermetic + value: "true" - name: git-url value: '{{source_url}}' - name: revision @@ -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 diff --git a/.tekton/placement-mce-28-pull-request.yaml b/.tekton/placement-mce-28-pull-request.yaml index 546294b69..a357d03cc 100644 --- a/.tekton/placement-mce-28-pull-request.yaml +++ b/.tekton/placement-mce-28-pull-request.yaml @@ -17,6 +17,8 @@ metadata: namespace: crt-redhat-acm-tenant spec: params: + - name: hermetic + value: "true" - name: git-url value: '{{source_url}}' - name: revision @@ -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 diff --git a/.tekton/placement-mce-28-push.yaml b/.tekton/placement-mce-28-push.yaml index ec040dcc5..74b8e353a 100644 --- a/.tekton/placement-mce-28-push.yaml +++ b/.tekton/placement-mce-28-push.yaml @@ -16,6 +16,8 @@ metadata: namespace: crt-redhat-acm-tenant spec: params: + - name: hermetic + value: "true" - name: git-url value: '{{source_url}}' - name: revision @@ -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 diff --git a/.tekton/registration-mce-28-pull-request.yaml b/.tekton/registration-mce-28-pull-request.yaml index 27920a133..3c85b268b 100644 --- a/.tekton/registration-mce-28-pull-request.yaml +++ b/.tekton/registration-mce-28-pull-request.yaml @@ -17,6 +17,8 @@ metadata: namespace: crt-redhat-acm-tenant spec: params: + - name: hermetic + value: "true" - name: git-url value: '{{source_url}}' - name: revision @@ -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 diff --git a/.tekton/registration-mce-28-push.yaml b/.tekton/registration-mce-28-push.yaml index 04c036f62..771876d2f 100644 --- a/.tekton/registration-mce-28-push.yaml +++ b/.tekton/registration-mce-28-push.yaml @@ -16,6 +16,8 @@ metadata: namespace: crt-redhat-acm-tenant spec: params: + - name: hermetic + value: "true" - name: git-url value: '{{source_url}}' - name: revision @@ -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 diff --git a/.tekton/registration-operator-mce-28-pull-request.yaml b/.tekton/registration-operator-mce-28-pull-request.yaml index 4334c0628..79a9ba368 100644 --- a/.tekton/registration-operator-mce-28-pull-request.yaml +++ b/.tekton/registration-operator-mce-28-pull-request.yaml @@ -17,6 +17,8 @@ metadata: namespace: crt-redhat-acm-tenant spec: params: + - name: hermetic + value: "true" - name: git-url value: '{{source_url}}' - name: revision @@ -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 diff --git a/.tekton/registration-operator-mce-28-push.yaml b/.tekton/registration-operator-mce-28-push.yaml index 36f043a38..180bc8f08 100644 --- a/.tekton/registration-operator-mce-28-push.yaml +++ b/.tekton/registration-operator-mce-28-push.yaml @@ -16,6 +16,8 @@ metadata: namespace: crt-redhat-acm-tenant spec: params: + - name: hermetic + value: "true" - name: git-url value: '{{source_url}}' - name: revision @@ -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 diff --git a/.tekton/work-mce-28-pull-request.yaml b/.tekton/work-mce-28-pull-request.yaml index 26d64eccf..a6f16e13a 100644 --- a/.tekton/work-mce-28-pull-request.yaml +++ b/.tekton/work-mce-28-pull-request.yaml @@ -17,6 +17,8 @@ metadata: namespace: crt-redhat-acm-tenant spec: params: + - name: hermetic + value: "true" - name: git-url value: '{{source_url}}' - name: revision @@ -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 diff --git a/.tekton/work-mce-28-push.yaml b/.tekton/work-mce-28-push.yaml index 8a06289ff..1506a01a4 100644 --- a/.tekton/work-mce-28-push.yaml +++ b/.tekton/work-mce-28-push.yaml @@ -16,6 +16,8 @@ metadata: namespace: crt-redhat-acm-tenant spec: params: + - name: hermetic + value: "true" - name: git-url value: '{{source_url}}' - name: revision @@ -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 diff --git a/build/Dockerfile.addon.rhtap b/build/Dockerfile.addon.rhtap index 6f1c58db1..bcc9ec932 100644 --- a/build/Dockerfile.addon.rhtap +++ b/build/Dockerfile.addon.rhtap @@ -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 / diff --git a/build/Dockerfile.placement.rhtap b/build/Dockerfile.placement.rhtap index 8faf49a91..4c219b39c 100644 --- a/build/Dockerfile.placement.rhtap +++ b/build/Dockerfile.placement.rhtap @@ -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 / diff --git a/build/Dockerfile.registration-operator.rhtap b/build/Dockerfile.registration-operator.rhtap index 5a5bf5faf..bde600963 100644 --- a/build/Dockerfile.registration-operator.rhtap +++ b/build/Dockerfile.registration-operator.rhtap @@ -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 / diff --git a/build/Dockerfile.registration.rhtap b/build/Dockerfile.registration.rhtap index 65cfbf4d7..40ef583cd 100644 --- a/build/Dockerfile.registration.rhtap +++ b/build/Dockerfile.registration.rhtap @@ -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 / diff --git a/build/Dockerfile.work.rhtap b/build/Dockerfile.work.rhtap index 10f0dabb6..5ee6a0905 100644 --- a/build/Dockerfile.work.rhtap +++ b/build/Dockerfile.work.rhtap @@ -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 /