From 0e1000c9298d5d1c1992509fbd8113031784eddf Mon Sep 17 00:00:00 2001 From: Rayford Johnson Date: Mon, 16 Jun 2025 10:43:35 -0500 Subject: [PATCH 1/4] build-platforms --- ...-oadp-non-admin-oadp-1-5-pull-request.yaml | 23 ++++++++----------- .../oadp-oadp-non-admin-oadp-1-5-push.yaml | 23 ++++++++----------- 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/.tekton/oadp-oadp-non-admin-oadp-1-5-pull-request.yaml b/.tekton/oadp-oadp-non-admin-oadp-1-5-pull-request.yaml index c8f7f2e0..a5a7d292 100644 --- a/.tekton/oadp-oadp-non-admin-oadp-1-5-pull-request.yaml +++ b/.tekton/oadp-oadp-non-admin-oadp-1-5-pull-request.yaml @@ -8,9 +8,8 @@ metadata: build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/cancel-in-progress: "true" pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch - == "oadp-1.5" - creationTimestamp: null + pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "oadp-1.5" + creationTimestamp: labels: appstudio.openshift.io/application: oadp-oadp-non-admin appstudio.openshift.io/component: oadp-oadp-non-admin-oadp-1-5 @@ -29,6 +28,9 @@ spec: value: 5d - name: build-platforms value: + - linux/arm64 + - linux/ppc64le + - linux/s390x - linux/x86_64 - name: dockerfile value: Dockerfile.oadp @@ -68,13 +70,11 @@ spec: name: output-image type: string - default: . - description: Path to the source code of an application's component from where - to build image. + description: Path to the source code of an application's component from where to build image. name: path-context type: string - default: Dockerfile - description: Path to the Dockerfile inside the context specified by parameter - path-context + description: Path to the Dockerfile inside the context specified by parameter path-context name: dockerfile type: string - default: "false" @@ -94,8 +94,7 @@ spec: name: prefetch-input type: string - default: "" - description: Image tag expiration time, time values could be something like - 1h, 2d, 3w for hours, days, and weeks, respectively. + 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" description: Build a source image. @@ -114,14 +113,12 @@ spec: name: build-args-file type: string - default: "false" - description: Whether to enable privileged mode, should be used only with remote - VMs + description: Whether to enable privileged mode, should be used only with remote VMs name: privileged-nested type: string - default: - linux/x86_64 - description: List of platforms to build the container images on. The available - set of values is determined by the configuration of the multi-platform-controller. + description: List of platforms to build the container images on. The available set of values is determined by the configuration of the multi-platform-controller. name: build-platforms type: array results: diff --git a/.tekton/oadp-oadp-non-admin-oadp-1-5-push.yaml b/.tekton/oadp-oadp-non-admin-oadp-1-5-push.yaml index a05961fa..c468dfc3 100644 --- a/.tekton/oadp-oadp-non-admin-oadp-1-5-push.yaml +++ b/.tekton/oadp-oadp-non-admin-oadp-1-5-push.yaml @@ -7,9 +7,8 @@ metadata: build.appstudio.redhat.com/target_branch: '{{target_branch}}' pipelinesascode.tekton.dev/cancel-in-progress: "false" pipelinesascode.tekton.dev/max-keep-runs: "3" - pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch - == "oadp-1.5" - creationTimestamp: null + pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "oadp-1.5" + creationTimestamp: labels: appstudio.openshift.io/application: oadp-oadp-non-admin appstudio.openshift.io/component: oadp-oadp-non-admin-oadp-1-5 @@ -26,6 +25,9 @@ spec: value: quay.io/redhat-user-workloads/ocp-art-tenant/oadp-oadp-non-admin-oadp-1-5:{{revision}} - name: build-platforms value: + - linux/arm64 + - linux/ppc64le + - linux/s390x - linux/x86_64 - name: dockerfile value: Dockerfile.oadp @@ -65,13 +67,11 @@ spec: name: output-image type: string - default: . - description: Path to the source code of an application's component from where - to build image. + description: Path to the source code of an application's component from where to build image. name: path-context type: string - default: Dockerfile - description: Path to the Dockerfile inside the context specified by parameter - path-context + description: Path to the Dockerfile inside the context specified by parameter path-context name: dockerfile type: string - default: "false" @@ -91,8 +91,7 @@ spec: name: prefetch-input type: string - default: "" - description: Image tag expiration time, time values could be something like - 1h, 2d, 3w for hours, days, and weeks, respectively. + 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" description: Build a source image. @@ -111,14 +110,12 @@ spec: name: build-args-file type: string - default: "false" - description: Whether to enable privileged mode, should be used only with remote - VMs + description: Whether to enable privileged mode, should be used only with remote VMs name: privileged-nested type: string - default: - linux/x86_64 - description: List of platforms to build the container images on. The available - set of values is determined by the configuration of the multi-platform-controller. + description: List of platforms to build the container images on. The available set of values is determined by the configuration of the multi-platform-controller. name: build-platforms type: array results: From 41872b845fabe153f17c6b6eca749d85a6028361 Mon Sep 17 00:00:00 2001 From: Rayford Johnson Date: Mon, 16 Jun 2025 10:45:36 -0500 Subject: [PATCH 2/4] generate-labels, LABELS --- ...-oadp-non-admin-oadp-1-5-pull-request.yaml | 36 +++++++++++++++++++ .../oadp-oadp-non-admin-oadp-1-5-push.yaml | 36 +++++++++++++++++++ Dockerfile.oadp | 13 ------- 3 files changed, 72 insertions(+), 13 deletions(-) diff --git a/.tekton/oadp-oadp-non-admin-oadp-1-5-pull-request.yaml b/.tekton/oadp-oadp-non-admin-oadp-1-5-pull-request.yaml index a5a7d292..66a282f7 100644 --- a/.tekton/oadp-oadp-non-admin-oadp-1-5-pull-request.yaml +++ b/.tekton/oadp-oadp-non-admin-oadp-1-5-pull-request.yaml @@ -241,6 +241,20 @@ spec: value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT) - name: IMAGE_APPEND_PLATFORM value: "true" + - name: LABELS + value: + - $(tasks.generate-labels.results.labels[*]) + - License=Apache License 2.0 + - com.redhat.component=oadp-non-admin-container + - io.k8s.description=OpenShift API for Data Protection - Non-Admin + - io.k8s.display-name=OADP Non-Admin + - io.openshift.build.source-location=https://github.com/migtools/oadp-non-admin + - io.openshift.tags=migration + - maintainer=OpenShift API for Data Protection Team + - name=oadp/oadp-non-admin-rhel9 + - summary=OpenShift API for Data Protection - Non-Admin + - vendor=Red Hat, Inc. + - version=1.5.0 runAfter: - prefetch-dependencies taskRef: @@ -604,6 +618,28 @@ spec: operator: in values: - "false" + - name: generate-labels + params: + - name: label-templates + value: + - build-date=$SOURCE_DATE + - short-commit=$(tasks.clone-repository.results.short-commit) + - io.openshift.build.commit.id=$(tasks.clone-repository.results.commit) + - io.openshift.build.commit.url=https://github.com/migtools/oadp-non-admin/commit/$(tasks.clone-repository.results.commit) + - release=$ACTUAL_DATE_EPOCH + - name: source-date-epoch + value: $(tasks.clone-repository.results.commit-timestamp) + runAfter: + - clone-repository + taskRef: + params: + - name: name + value: generate-labels + - name: bundle + value: quay.io/konflux-ci/tekton-catalog/task-generate-labels:0.1@sha256:e1f4746dc33206a17867ead8f5c82a569cd925d352a19d108f205f54efc5589d + - name: kind + value: task + resolver: bundles workspaces: - name: git-auth optional: true diff --git a/.tekton/oadp-oadp-non-admin-oadp-1-5-push.yaml b/.tekton/oadp-oadp-non-admin-oadp-1-5-push.yaml index c468dfc3..a5345594 100644 --- a/.tekton/oadp-oadp-non-admin-oadp-1-5-push.yaml +++ b/.tekton/oadp-oadp-non-admin-oadp-1-5-push.yaml @@ -238,6 +238,20 @@ spec: value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT) - name: IMAGE_APPEND_PLATFORM value: "true" + - name: LABELS + value: + - $(tasks.generate-labels.results.labels[*]) + - License=Apache License 2.0 + - com.redhat.component=oadp-non-admin-container + - io.k8s.description=OpenShift API for Data Protection - Non-Admin + - io.k8s.display-name=OADP Non-Admin + - io.openshift.build.source-location=https://github.com/migtools/oadp-non-admin + - io.openshift.tags=migration + - maintainer=OpenShift API for Data Protection Team + - name=oadp/oadp-non-admin-rhel9 + - summary=OpenShift API for Data Protection - Non-Admin + - vendor=Red Hat, Inc. + - version=1.5.0 runAfter: - prefetch-dependencies taskRef: @@ -601,6 +615,28 @@ spec: operator: in values: - "false" + - name: generate-labels + params: + - name: label-templates + value: + - build-date=$SOURCE_DATE + - short-commit=$(tasks.clone-repository.results.short-commit) + - io.openshift.build.commit.id=$(tasks.clone-repository.results.commit) + - io.openshift.build.commit.url=https://github.com/migtools/oadp-non-admin/commit/$(tasks.clone-repository.results.commit) + - release=$ACTUAL_DATE_EPOCH + - name: source-date-epoch + value: $(tasks.clone-repository.results.commit-timestamp) + runAfter: + - clone-repository + taskRef: + params: + - name: name + value: generate-labels + - name: bundle + value: quay.io/konflux-ci/tekton-catalog/task-generate-labels:0.1@sha256:e1f4746dc33206a17867ead8f5c82a569cd925d352a19d108f205f54efc5589d + - name: kind + value: task + resolver: bundles workspaces: - name: git-auth optional: true diff --git a/Dockerfile.oadp b/Dockerfile.oadp index e3121bd5..ec9ab652 100644 --- a/Dockerfile.oadp +++ b/Dockerfile.oadp @@ -18,16 +18,3 @@ USER 65532:65532 ENTRYPOINT ["/manager"] -LABEL \ - com.redhat.component="oadp-non-admin-container" \ - version="1.5.0" \ - name="oadp/oadp-non-admin-rhel9" \ - License="Apache License 2.0" \ - io.k8s.display-name="OADP Non-Admin" \ - io.openshift.tags="migration" \ - io.k8s.description="OpenShift API for Data Protection - Non-Admin" \ - io.openshift.build.commit.id="58b7d83dc66a82fcac0f317a84c8845e3386921d" \ - io.openshift.build.source-location="https://github.com/migtools/oadp-non-admin" \ - io.openshift.build.commit.url="https://github.com/migtools/oadp-non-admin/commit/58b7d83dc66a82fcac0f317a84c8845e3386921d" \ - summary="OpenShift API for Data Protection - Non-Admin" \ - maintainer="OpenShift API for Data Protection Team " From a1ddbc7e709c6392aa403f7d5776fa2b7ed1b552 Mon Sep 17 00:00:00 2001 From: Rayford Johnson Date: Mon, 16 Jun 2025 10:47:19 -0500 Subject: [PATCH 3/4] ADDITIONAL_TAGS --- .tekton/oadp-oadp-non-admin-oadp-1-5-pull-request.yaml | 3 +++ .tekton/oadp-oadp-non-admin-oadp-1-5-push.yaml | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/.tekton/oadp-oadp-non-admin-oadp-1-5-pull-request.yaml b/.tekton/oadp-oadp-non-admin-oadp-1-5-pull-request.yaml index 66a282f7..a52e85a4 100644 --- a/.tekton/oadp-oadp-non-admin-oadp-1-5-pull-request.yaml +++ b/.tekton/oadp-oadp-non-admin-oadp-1-5-pull-request.yaml @@ -562,6 +562,9 @@ spec: params: - name: IMAGE value: $(tasks.build-image-index.results.IMAGE_URL) + - name: ADDITIONAL_TAGS + value: + - 'pull-request-{{pull_request_number}}' runAfter: - build-image-index taskRef: diff --git a/.tekton/oadp-oadp-non-admin-oadp-1-5-push.yaml b/.tekton/oadp-oadp-non-admin-oadp-1-5-push.yaml index a5345594..fe167de2 100644 --- a/.tekton/oadp-oadp-non-admin-oadp-1-5-push.yaml +++ b/.tekton/oadp-oadp-non-admin-oadp-1-5-push.yaml @@ -559,6 +559,11 @@ spec: params: - name: IMAGE value: $(tasks.build-image-index.results.IMAGE_URL) + - name: ADDITIONAL_TAGS + value: + - '1.5' + - '1.5.1' + - 'latest' runAfter: - build-image-index taskRef: From f26b9d91377c1a0e644b0bab97137971d6c39b50 Mon Sep 17 00:00:00 2001 From: Tiger Kaovilai Date: Mon, 16 Jun 2025 16:57:01 -0400 Subject: [PATCH 4/4] fix: add git status check for Velero manifests update in NAC Signed-off-by: Tiger Kaovilai --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6539e0a7..3ed022c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,7 +90,9 @@ jobs: - name: Check Non Admin Controller (NAC) manifests working-directory: ./oadp-operator run: | + git status NON_ADMIN_CONTROLLER_PATH=../oadp-non-admin make update-non-admin-manifests + git status if test -n "$(git status --short)"; then echo "::error::run 'make update-non-admin-manifests' in OADP repository to update Non Admin Controller (NAC) manifests" exit 1 @@ -99,8 +101,10 @@ jobs: - name: Check Velero manifests working-directory: ./oadp-non-admin run: | + git status OADP_OPERATOR_PATH=../oadp-operator make update-velero-manifests if test -n "$(git status --short)"; then + git status echo "::error::run 'make update-velero-manifests' in Non Admin Controller (NAC) repository to update Velero manifests" exit 1 fi