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 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..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 @@ -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: @@ -244,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: @@ -551,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: @@ -607,6 +621,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 a05961fa..fe167de2 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: @@ -241,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: @@ -548,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: @@ -604,6 +620,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 "