diff --git a/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6.yaml b/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6.yaml index 0841369a62368..34a8965fb3fb8 100644 --- a/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6.yaml +++ b/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6.yaml @@ -1,3 +1,8 @@ +base_images: + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-1.6 build_root: image_stream_tag: name: builder @@ -13,6 +18,12 @@ promotion: to: - name: kubevirt-datamover-controller namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "5.0" resources: '*': limits: @@ -20,6 +31,70 @@ resources: requests: cpu: 100m memory: 200Mi +tests: +- always_run: false + as: e2e-test-aws + run_if_changed: .+\.go|go\.(\bmod\b|\bsum\b)|Makefile|Dockerfile|.dockerignore|.*\.ya{0,1}ml|.sh + steps: + cluster_profile: openshift-org-aws + dependencies: + OO_INDEX: src + env: + OO_BUNDLE: registry.ci.openshift.org/konveyor/oadp-operator-bundle:oadp-1.6 + OO_CHANNEL: stable + OO_INSTALL_NAMESPACE: openshift-adp + OO_PACKAGE: oadp-operator + OO_TARGET_NAMESPACES: '!install' + post: + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: optional-operators-opm-index-from-bundle + - ref: optional-operators-subscribe + test: + - as: set-related-image + cli: latest + commands: | + SUB=$(cat "${SHARED_DIR}/oo-subscription") + echo "Discovered Subscription: ${SUB}" + # Subscription.spec.config.env is OLM's supported override mechanism: + # it wins over same-named CSV env vars and survives reconciliation, + # unlike patching the Deployment directly (OLM reconciles that from + # the CSV and would revert it). + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "$(jq -n --arg img "${KDM_CONTROLLER_IMAGE}" '{spec:{config:{env:[{name:"RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER",value:$img}]}}}')" + echo "Waiting for Deployment to observe RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER=${KDM_CONTROLLER_IMAGE}" + for i in $(seq 1 60); do + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER\")].value}" 2>/dev/null || true) + [ "${CURRENT}" = "${KDM_CONTROLLER_IMAGE}" ] && break + sleep 5 + done + if [ "${CURRENT}" != "${KDM_CONTROLLER_IMAGE}" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + dependencies: + - env: KDM_CONTROLLER_IMAGE + name: kubevirt-datamover-controller-oadp-1.6 + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make TEST_VIRT=true test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-1.6 org: migtools diff --git a/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev.yaml b/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev.yaml index 6cd5562fe088b..8c196afc30f6b 100644 --- a/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev.yaml +++ b/ci-operator/config/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev.yaml @@ -1,3 +1,8 @@ +base_images: + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-dev build_root: image_stream_tag: name: builder @@ -13,6 +18,12 @@ promotion: to: - namespace: konveyor tag: oadp-dev +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "5.0" resources: '*': limits: @@ -20,6 +31,70 @@ resources: requests: cpu: 100m memory: 200Mi +tests: +- always_run: false + as: e2e-test-aws + run_if_changed: .+\.go|go\.(\bmod\b|\bsum\b)|Makefile|Dockerfile|.dockerignore|.*\.ya{0,1}ml|.sh + steps: + cluster_profile: openshift-org-aws + dependencies: + OO_INDEX: src + env: + OO_BUNDLE: registry.ci.openshift.org/konveyor/oadp-operator-bundle:oadp-dev + OO_CHANNEL: dev + OO_INSTALL_NAMESPACE: openshift-adp + OO_PACKAGE: oadp-operator + OO_TARGET_NAMESPACES: '!install' + post: + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: optional-operators-opm-index-from-bundle + - ref: optional-operators-subscribe + test: + - as: set-related-image + cli: latest + commands: | + SUB=$(cat "${SHARED_DIR}/oo-subscription") + echo "Discovered Subscription: ${SUB}" + # Subscription.spec.config.env is OLM's supported override mechanism: + # it wins over same-named CSV env vars and survives reconciliation, + # unlike patching the Deployment directly (OLM reconciles that from + # the CSV and would revert it). + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "$(jq -n --arg img "${KDM_CONTROLLER_IMAGE}" '{spec:{config:{env:[{name:"RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER",value:$img}]}}}')" + echo "Waiting for Deployment to observe RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER=${KDM_CONTROLLER_IMAGE}" + for i in $(seq 1 60); do + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"RELATED_IMAGE_KUBEVIRT_DATAMOVER_CONTROLLER\")].value}" 2>/dev/null || true) + [ "${CURRENT}" = "${KDM_CONTROLLER_IMAGE}" ] && break + sleep 5 + done + if [ "${CURRENT}" != "${KDM_CONTROLLER_IMAGE}" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + dependencies: + - env: KDM_CONTROLLER_IMAGE + name: kubevirt-datamover-controller + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make TEST_VIRT=true test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-dev org: migtools diff --git a/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6.yaml b/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6.yaml index 74ebd47549d07..41dbb9303350c 100644 --- a/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6.yaml +++ b/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6.yaml @@ -1,3 +1,8 @@ +base_images: + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-1.6 build_root: image_stream_tag: name: builder @@ -13,6 +18,12 @@ promotion: to: - name: kubevirt-datamover-plugin namespace: konveyor +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "5.0" resources: '*': limits: @@ -20,6 +31,70 @@ resources: requests: cpu: 100m memory: 200Mi +tests: +- always_run: false + as: e2e-test-aws + run_if_changed: .+\.go|go\.(\bmod\b|\bsum\b)|Makefile|Dockerfile|.dockerignore|.*\.ya{0,1}ml|.sh + steps: + cluster_profile: openshift-org-aws + dependencies: + OO_INDEX: src + env: + OO_BUNDLE: registry.ci.openshift.org/konveyor/oadp-operator-bundle:oadp-1.6 + OO_CHANNEL: stable + OO_INSTALL_NAMESPACE: openshift-adp + OO_PACKAGE: oadp-operator + OO_TARGET_NAMESPACES: '!install' + post: + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: optional-operators-opm-index-from-bundle + - ref: optional-operators-subscribe + test: + - as: set-related-image + cli: latest + commands: | + SUB=$(cat "${SHARED_DIR}/oo-subscription") + echo "Discovered Subscription: ${SUB}" + # Subscription.spec.config.env is OLM's supported override mechanism: + # it wins over same-named CSV env vars and survives reconciliation, + # unlike patching the Deployment directly (OLM reconciles that from + # the CSV and would revert it). + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "$(jq -n --arg img "${KDM_PLUGIN_IMAGE}" '{spec:{config:{env:[{name:"RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN",value:$img}]}}}')" + echo "Waiting for Deployment to observe RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN=${KDM_PLUGIN_IMAGE}" + for i in $(seq 1 60); do + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN\")].value}" 2>/dev/null || true) + [ "${CURRENT}" = "${KDM_PLUGIN_IMAGE}" ] && break + sleep 5 + done + if [ "${CURRENT}" != "${KDM_PLUGIN_IMAGE}" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + dependencies: + - env: KDM_PLUGIN_IMAGE + name: kubevirt-datamover-plugin-oadp-1.6 + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make TEST_VIRT=true test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-1.6 org: migtools diff --git a/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev.yaml b/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev.yaml index 3fb476682384d..54867d34edcc7 100644 --- a/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev.yaml +++ b/ci-operator/config/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev.yaml @@ -1,3 +1,8 @@ +base_images: + test-oadp-operator: + name: oadp-operator-e2e-tests + namespace: konveyor + tag: oadp-dev build_root: image_stream_tag: name: builder @@ -13,6 +18,12 @@ promotion: to: - namespace: konveyor tag: oadp-dev +releases: + latest: + candidate: + product: ocp + stream: nightly + version: "5.0" resources: '*': limits: @@ -20,6 +31,70 @@ resources: requests: cpu: 100m memory: 200Mi +tests: +- always_run: false + as: e2e-test-aws + run_if_changed: .+\.go|go\.(\bmod\b|\bsum\b)|Makefile|Dockerfile|.dockerignore|.*\.ya{0,1}ml|.sh + steps: + cluster_profile: openshift-org-aws + dependencies: + OO_INDEX: src + env: + OO_BUNDLE: registry.ci.openshift.org/konveyor/oadp-operator-bundle:oadp-dev + OO_CHANNEL: dev + OO_INSTALL_NAMESPACE: openshift-adp + OO_PACKAGE: oadp-operator + OO_TARGET_NAMESPACES: '!install' + post: + - chain: ipi-aws-post + pre: + - chain: ipi-aws-pre + - ref: optional-operators-opm-index-from-bundle + - ref: optional-operators-subscribe + test: + - as: set-related-image + cli: latest + commands: | + SUB=$(cat "${SHARED_DIR}/oo-subscription") + echo "Discovered Subscription: ${SUB}" + # Subscription.spec.config.env is OLM's supported override mechanism: + # it wins over same-named CSV env vars and survives reconciliation, + # unlike patching the Deployment directly (OLM reconciles that from + # the CSV and would revert it). + oc patch subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" --type merge -p "$(jq -n --arg img "${KDM_PLUGIN_IMAGE}" '{spec:{config:{env:[{name:"RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN",value:$img}]}}}')" + echo "Waiting for Deployment to observe RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN=${KDM_PLUGIN_IMAGE}" + for i in $(seq 1 60); do + CURRENT=$(oc get deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" -o jsonpath="{.spec.template.spec.containers[?(@.name==\"manager\")].env[?(@.name==\"RELATED_IMAGE_KUBEVIRT_DATAMOVER_PLUGIN\")].value}" 2>/dev/null || true) + [ "${CURRENT}" = "${KDM_PLUGIN_IMAGE}" ] && break + sleep 5 + done + if [ "${CURRENT}" != "${KDM_PLUGIN_IMAGE}" ]; then + echo "Timed out waiting for Deployment spec to reflect the Subscription.spec.config.env override" >&2 + oc get subscription "${SUB}" -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/subscription-${SUB}.yaml" || true + oc get csv -n "${OO_INSTALL_NAMESPACE}" -o yaml > "${ARTIFACT_DIR}/csvs.yaml" || true + exit 1 + fi + oc rollout status deployment/openshift-adp-controller-manager -n "${OO_INSTALL_NAMESPACE}" --timeout=180s + dependencies: + - env: KDM_PLUGIN_IMAGE + name: kubevirt-datamover-plugin + from: cli + resources: + requests: + cpu: 100m + memory: 100Mi + - as: e2e + cli: latest + commands: make TEST_VIRT=true test-e2e + credentials: + - mount_path: /var/run/oadp-credentials + name: oadp-credentials + namespace: test-credentials + from: test-oadp-operator + resources: + requests: + cpu: 1000m + memory: 512Mi zz_generated_metadata: branch: oadp-dev org: migtools diff --git a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6.yaml b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6.yaml index be749c95d0374..30e36950eba5c 100644 --- a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6.yaml +++ b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6.yaml @@ -13,7 +13,9 @@ images: to: test-oadp-operator operator: bundles: - - dockerfile_path: build/Dockerfile.bundle + - as: oadp-operator-bundle + dockerfile_path: build/Dockerfile.bundle + skip_building_index: true promotion: to: - excluded_images: @@ -21,8 +23,8 @@ promotion: name: oadp-operator namespace: konveyor - additional_images: + oadp-operator-bundle: oadp-operator-bundle oadp-operator-e2e-tests: test-oadp-operator - oadp-operator-index: ci-index namespace: konveyor tag: oadp-1.6 resources: diff --git a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev.yaml b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev.yaml index 6b3863b6fe8b4..b9be0fa4f907c 100644 --- a/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev.yaml +++ b/ci-operator/config/openshift/oadp-operator/openshift-oadp-operator-oadp-dev.yaml @@ -13,7 +13,9 @@ images: to: test-oadp-operator operator: bundles: - - dockerfile_path: build/Dockerfile.bundle + - as: oadp-operator-bundle + dockerfile_path: build/Dockerfile.bundle + skip_building_index: true promotion: to: - excluded_images: @@ -21,8 +23,8 @@ promotion: name: oadp-operator namespace: konveyor - additional_images: + oadp-operator-bundle: oadp-operator-bundle oadp-operator-e2e-tests: test-oadp-operator - oadp-operator-index: ci-index namespace: konveyor tag: oadp-dev resources: diff --git a/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6-postsubmits.yaml b/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6-postsubmits.yaml index 6e6a435045bc0..15a55b786d20b 100644 --- a/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6-postsubmits.yaml +++ b/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "5.0" max_concurrency: 1 name: branch-ci-migtools-kubevirt-datamover-controller-oadp-1.6-images spec: diff --git a/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6-presubmits.yaml b/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6-presubmits.yaml index e2a48e2137d1e..939656a640fab 100644 --- a/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6-presubmits.yaml +++ b/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-1.6-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: migtools/kubevirt-datamover-controller: + - agent: kubernetes + always_run: false + branches: + - ^oadp-1\.6$ + - ^oadp-1\.6- + cluster: build11 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "5.0" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-migtools-kubevirt-datamover-controller-oadp-1.6-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: .+\.go|go\.(\bmod\b|\bsum\b)|Makefile|Dockerfile|.dockerignore|.*\.ya{0,1}ml|.sh + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-migtools-kubevirt-datamover-controller-oadp-1.6-images rerun_command: /test images diff --git a/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev-postsubmits.yaml b/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev-postsubmits.yaml index a01715b010015..5b5e4ce363dec 100644 --- a/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev-postsubmits.yaml +++ b/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "5.0" max_concurrency: 1 name: branch-ci-migtools-kubevirt-datamover-controller-oadp-dev-images spec: diff --git a/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev-presubmits.yaml b/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev-presubmits.yaml index 24990c860ac38..6f4e7c8cfad00 100644 --- a/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev-presubmits.yaml +++ b/ci-operator/jobs/migtools/kubevirt-datamover-controller/migtools-kubevirt-datamover-controller-oadp-dev-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: migtools/kubevirt-datamover-controller: + - agent: kubernetes + always_run: false + branches: + - ^oadp-dev$ + - ^oadp-dev- + cluster: build11 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "5.0" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-migtools-kubevirt-datamover-controller-oadp-dev-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: .+\.go|go\.(\bmod\b|\bsum\b)|Makefile|Dockerfile|.dockerignore|.*\.ya{0,1}ml|.sh + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-migtools-kubevirt-datamover-controller-oadp-dev-images rerun_command: /test images diff --git a/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6-postsubmits.yaml b/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6-postsubmits.yaml index 1fde5040ef48e..4e545be58496a 100644 --- a/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6-postsubmits.yaml +++ b/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "5.0" max_concurrency: 1 name: branch-ci-migtools-kubevirt-datamover-plugin-oadp-1.6-images spec: diff --git a/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6-presubmits.yaml b/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6-presubmits.yaml index e50593dde217e..f419440bb065c 100644 --- a/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6-presubmits.yaml +++ b/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-1.6-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: migtools/kubevirt-datamover-plugin: + - agent: kubernetes + always_run: false + branches: + - ^oadp-1\.6$ + - ^oadp-1\.6- + cluster: build06 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "5.0" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-migtools-kubevirt-datamover-plugin-oadp-1.6-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: .+\.go|go\.(\bmod\b|\bsum\b)|Makefile|Dockerfile|.dockerignore|.*\.ya{0,1}ml|.sh + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-migtools-kubevirt-datamover-plugin-oadp-1.6-images rerun_command: /test images diff --git a/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev-postsubmits.yaml b/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev-postsubmits.yaml index 80bcdb3fa8b48..3eac88bdb87c0 100644 --- a/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev-postsubmits.yaml +++ b/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev-postsubmits.yaml @@ -13,6 +13,7 @@ postsubmits: capability/arm64: arm64 ci-operator.openshift.io/is-promotion: "true" ci.openshift.io/generator: prowgen + job-release: "5.0" max_concurrency: 1 name: branch-ci-migtools-kubevirt-datamover-plugin-oadp-dev-images spec: diff --git a/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev-presubmits.yaml b/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev-presubmits.yaml index eb598fe505c7a..653dceea47163 100644 --- a/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev-presubmits.yaml +++ b/ci-operator/jobs/migtools/kubevirt-datamover-plugin/migtools-kubevirt-datamover-plugin-oadp-dev-presubmits.yaml @@ -1,5 +1,90 @@ presubmits: migtools/kubevirt-datamover-plugin: + - agent: kubernetes + always_run: false + branches: + - ^oadp-dev$ + - ^oadp-dev- + cluster: build06 + context: ci/prow/e2e-test-aws + decorate: true + decoration_config: + sparse_checkout_files: + - Dockerfile + labels: + ci-operator.openshift.io/cloud: aws + ci-operator.openshift.io/cloud-cluster-profile: openshift-org-aws + ci.openshift.io/generator: prowgen + job-release: "5.0" + pj-rehearse.openshift.io/can-be-rehearsed: "true" + name: pull-ci-migtools-kubevirt-datamover-plugin-oadp-dev-e2e-test-aws + rerun_command: /test e2e-test-aws + run_if_changed: .+\.go|go\.(\bmod\b|\bsum\b)|Makefile|Dockerfile|.dockerignore|.*\.ya{0,1}ml|.sh + spec: + containers: + - args: + - --gcs-upload-secret=/secrets/gcs/service-account.json + - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson + - --lease-server-credentials-file=/etc/boskos/credentials + - --report-credentials-file=/etc/report/credentials + - --secret-dir=/secrets/ci-pull-credentials + - --target=e2e-test-aws + command: + - ci-operator + env: + - name: HTTP_SERVER_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest + imagePullPolicy: Always + name: "" + ports: + - containerPort: 8080 + name: http + resources: + requests: + cpu: 10m + volumeMounts: + - mountPath: /etc/boskos + name: boskos + readOnly: true + - mountPath: /secrets/ci-pull-credentials + name: ci-pull-credentials + readOnly: true + - mountPath: /secrets/gcs + name: gcs-credentials + readOnly: true + - mountPath: /secrets/manifest-tool + name: manifest-tool-local-pusher + readOnly: true + - mountPath: /etc/pull-secret + name: pull-secret + readOnly: true + - mountPath: /etc/report + name: result-aggregator + readOnly: true + serviceAccountName: ci-operator + volumes: + - name: boskos + secret: + items: + - key: credentials + path: credentials + secretName: boskos-credentials + - name: ci-pull-credentials + secret: + secretName: ci-pull-credentials + - name: manifest-tool-local-pusher + secret: + secretName: manifest-tool-local-pusher + - name: pull-secret + secret: + secretName: registry-pull-credentials + - name: result-aggregator + secret: + secretName: result-aggregator + trigger: (?m)^/test( | .* )e2e-test-aws,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -14,6 +99,7 @@ presubmits: labels: capability/arm64: arm64 ci.openshift.io/generator: prowgen + job-release: "5.0" pj-rehearse.openshift.io/can-be-rehearsed: "true" name: pull-ci-migtools-kubevirt-datamover-plugin-oadp-dev-images rerun_command: /test images diff --git a/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6-postsubmits.yaml b/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6-postsubmits.yaml index 0890fd1aa182d..a4ffc5f7b86e6 100644 --- a/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6-postsubmits.yaml +++ b/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6-postsubmits.yaml @@ -25,7 +25,7 @@ postsubmits: - --promote - --report-credentials-file=/etc/report/credentials - --target=[images] - - --target=ci-index + - --target=oadp-operator-bundle - --target=test-oadp-operator command: - ci-operator diff --git a/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6-presubmits.yaml b/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6-presubmits.yaml index 8d0800ecf3ad3..456f72e5b6a0c 100644 --- a/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6-presubmits.yaml +++ b/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-1.6-presubmits.yaml @@ -1894,7 +1894,7 @@ presubmits: - ^oadp-1\.6$ - ^oadp-1\.6- cluster: build01 - context: ci/prow/ci-index + context: ci/prow/ci-bundle-oadp-operator-bundle decorate: true decoration_config: sparse_checkout_files: @@ -1903,15 +1903,15 @@ presubmits: labels: ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-oadp-operator-oadp-1.6-ci-index - rerun_command: /test ci-index + name: pull-ci-openshift-oadp-operator-oadp-1.6-ci-bundle-oadp-operator-bundle + rerun_command: /test ci-bundle-oadp-operator-bundle spec: containers: - args: - --gcs-upload-secret=/secrets/gcs/service-account.json - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --report-credentials-file=/etc/report/credentials - - --target=ci-index + - --target=oadp-operator-bundle command: - ci-operator image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest @@ -1944,7 +1944,7 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )ci-index,?($|\s.*) + trigger: (?m)^/test( | .* )ci-bundle-oadp-operator-bundle,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -1970,7 +1970,7 @@ presubmits: - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --report-credentials-file=/etc/report/credentials - --target=[images] - - --target=ci-index + - --target=oadp-operator-bundle - --target=test-oadp-operator command: - ci-operator diff --git a/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-dev-postsubmits.yaml b/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-dev-postsubmits.yaml index 1e20a7fdb62b1..4aed8eb33a8e7 100644 --- a/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-dev-postsubmits.yaml +++ b/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-dev-postsubmits.yaml @@ -25,7 +25,7 @@ postsubmits: - --promote - --report-credentials-file=/etc/report/credentials - --target=[images] - - --target=ci-index + - --target=oadp-operator-bundle - --target=test-oadp-operator command: - ci-operator diff --git a/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-dev-presubmits.yaml b/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-dev-presubmits.yaml index 3b9e724bb7536..49c938f9f7380 100644 --- a/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-dev-presubmits.yaml +++ b/ci-operator/jobs/openshift/oadp-operator/openshift-oadp-operator-oadp-dev-presubmits.yaml @@ -1369,7 +1369,7 @@ presubmits: - ^oadp-dev$ - ^oadp-dev- cluster: build05 - context: ci/prow/ci-index + context: ci/prow/ci-bundle-oadp-operator-bundle decorate: true decoration_config: sparse_checkout_files: @@ -1378,15 +1378,15 @@ presubmits: labels: ci.openshift.io/generator: prowgen pj-rehearse.openshift.io/can-be-rehearsed: "true" - name: pull-ci-openshift-oadp-operator-oadp-dev-ci-index - rerun_command: /test ci-index + name: pull-ci-openshift-oadp-operator-oadp-dev-ci-bundle-oadp-operator-bundle + rerun_command: /test ci-bundle-oadp-operator-bundle spec: containers: - args: - --gcs-upload-secret=/secrets/gcs/service-account.json - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --report-credentials-file=/etc/report/credentials - - --target=ci-index + - --target=oadp-operator-bundle command: - ci-operator image: quay-proxy.ci.openshift.org/openshift/ci:ci_ci-operator_latest @@ -1419,7 +1419,7 @@ presubmits: - name: result-aggregator secret: secretName: result-aggregator - trigger: (?m)^/test( | .* )ci-index,?($|\s.*) + trigger: (?m)^/test( | .* )ci-bundle-oadp-operator-bundle,?($|\s.*) - agent: kubernetes always_run: true branches: @@ -1445,7 +1445,7 @@ presubmits: - --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson - --report-credentials-file=/etc/report/credentials - --target=[images] - - --target=ci-index + - --target=oadp-operator-bundle - --target=test-oadp-operator command: - ci-operator diff --git a/ci-operator/step-registry/optional-operators/operator-sdk/non-ci-bundle-image/optional-operators-operator-sdk-non-ci-bundle-image-commands.sh b/ci-operator/step-registry/optional-operators/operator-sdk/non-ci-bundle-image/optional-operators-operator-sdk-non-ci-bundle-image-commands.sh index 88cb5d7c467fe..70b8e2a6274ec 100755 --- a/ci-operator/step-registry/optional-operators/operator-sdk/non-ci-bundle-image/optional-operators-operator-sdk-non-ci-bundle-image-commands.sh +++ b/ci-operator/step-registry/optional-operators/operator-sdk/non-ci-bundle-image/optional-operators-operator-sdk-non-ci-bundle-image-commands.sh @@ -63,7 +63,7 @@ fi INSTALL_MODE_ARG="" if [[ -n ${OO_INSTALL_MODE} ]]; then - INSTALL_MODE_ARG=--install-mode="${INSTALL_MODE_ARG}" + INSTALL_MODE_ARG=--install-mode="${OO_INSTALL_MODE}" fi ( cd /tmp diff --git a/ci-operator/step-registry/optional-operators/opm-index-from-bundle/OWNERS b/ci-operator/step-registry/optional-operators/opm-index-from-bundle/OWNERS new file mode 100644 index 0000000000000..a75d770dc3db3 --- /dev/null +++ b/ci-operator/step-registry/optional-operators/opm-index-from-bundle/OWNERS @@ -0,0 +1,28 @@ +approvers: +- dirgim +- jsztuka +- 14rcole +- maneeshmehra +- yashvardhannanavati +- nmars +- sonam1412 +- asergienk +reviewers: +- anik120 +- awgreene +- benluddy +- Bowenislandsong +- dinhxuanvu +- ecordell +- exdx +- gallettilance +- kevinrizza +- njhale +- dirgim +- jsztuka +- 14rcole +- nmars +- maneeshmehra +- yashvardhannanavati +- sonam1412 +- asergienk diff --git a/ci-operator/step-registry/optional-operators/opm-index-from-bundle/optional-operators-opm-index-from-bundle-commands.sh b/ci-operator/step-registry/optional-operators/opm-index-from-bundle/optional-operators-opm-index-from-bundle-commands.sh new file mode 100644 index 0000000000000..294743ef5b9c1 --- /dev/null +++ b/ci-operator/step-registry/optional-operators/opm-index-from-bundle/optional-operators-opm-index-from-bundle-commands.sh @@ -0,0 +1,83 @@ +#!/bin/bash + +set -o nounset +set -o errexit +set -o pipefail + +# For disconnected or otherwise unreachable environments, we want to +# have steps use an HTTP(S) proxy to reach the API server. This proxy +# configuration file should export HTTP_PROXY, HTTPS_PROXY, and NO_PROXY +# environment variables, as well as their lowercase equivalents (note +# that libcurl doesn't recognize the uppercase variables). +if test -f "${SHARED_DIR}/proxy-conf.sh" +then + # shellcheck disable=SC1090 + source "${SHARED_DIR}/proxy-conf.sh" +fi + +echo "[$(date --utc +%FT%T.%3NZ)] == Parameters:" +echo "[$(date --utc +%FT%T.%3NZ)] OO_BUNDLE: $OO_BUNDLE" +echo "[$(date --utc +%FT%T.%3NZ)] OPM_BASE_IMAGE: $OPM_BASE_IMAGE" + +TOOLS_DIR=/tmp/bin +mkdir -p "${TOOLS_DIR}" +export PATH="${TOOLS_DIR}:${PATH}" + +echo "[$(date --utc +%FT%T.%3NZ)] Installing opm" +curl -sL --retry 5 https://github.com/operator-framework/operator-registry/releases/download/v1.26.2/linux-amd64-opm -o "${TOOLS_DIR}/opm" && chmod +x "${TOOLS_DIR}/opm" + +echo "[$(date --utc +%FT%T.%3NZ)] Installing umoci" +curl -sL --retry 5 https://github.com/opencontainers/umoci/releases/download/v0.4.7/umoci.amd64 -o "${TOOLS_DIR}/umoci" && chmod +x "${TOOLS_DIR}/umoci" + +echo "[$(date --utc +%FT%T.%3NZ)] Installing skopeo" +oc image extract quay.io/skopeo/stable:latest --path /usr/bin/skopeo:"${TOOLS_DIR}" --filter-by-os="linux/amd64" --confirm +chmod +x "${TOOLS_DIR}/skopeo" + +echo "[$(date --utc +%FT%T.%3NZ)] Installing jq" +curl -sL --retry 5 https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -o "${TOOLS_DIR}/jq" && chmod +x "${TOOLS_DIR}/jq" + +echo "[$(date --utc +%FT%T.%3NZ)] Extracting the test cluster's own global pull secret (needed to pull OO_BUNDLE from registry.ci.openshift.org)" +oc extract secret/pull-secret -n openshift-config --confirm --to /tmp +BUNDLE_AUTH_FILE=/tmp/.dockerconfigjson + +echo "[$(date --utc +%FT%T.%3NZ)] Logging in to this job's own build-farm registry namespace" +AUTH_FILE=/tmp/oo-index-auth.json +KUBECONFIG="" oc registry login --to="${AUTH_FILE}" +REGISTRY_HOST=$(jq -r '.auths | keys[0]' "${AUTH_FILE}") + +INDEX_DESTINATION="${REGISTRY_HOST}/${NAMESPACE}/oadp-operator-index:latest" +BUNDLE_MIRROR="${REGISTRY_HOST}/${NAMESPACE}/oadp-operator-bundle-mirror:latest" + +tmp=$(mktemp -d) +cd "${tmp}" + +echo "[$(date --utc +%FT%T.%3NZ)] Mirroring ${OO_BUNDLE} to ${BUNDLE_MIRROR}" +echo "[$(date --utc +%FT%T.%3NZ)] opm's own pull mechanism does not reliably authenticate against registry.ci.openshift.org, so mirror the bundle into this job's own (already-authenticated) build-farm namespace first, and have opm pull from there instead" +skopeo copy --src-authfile="${BUNDLE_AUTH_FILE}" --dest-authfile="${AUTH_FILE}" "docker://${OO_BUNDLE}" "docker://${BUNDLE_MIRROR}" + +echo "[$(date --utc +%FT%T.%3NZ)] Generating index database from bundle ${BUNDLE_MIRROR}" +export REGISTRY_AUTH_FILE="${AUTH_FILE}" +opm index add \ + --bundles "${BUNDLE_MIRROR}" \ + --out-dockerfile index.Dockerfile \ + --generate + +echo "[$(date --utc +%FT%T.%3NZ)] Assembling index image from ${OPM_BASE_IMAGE}" +skopeo copy --authfile="${AUTH_FILE}" "docker://${OPM_BASE_IMAGE}" oci:opm:latest +umoci unpack --rootless --image opm:latest bundle +mv database bundle/rootfs/ +umoci repack --image opm:index bundle +umoci config --config.label 'operators.operatorframework.io.index.database.v1=/database/index.db' --image opm:index +umoci config --config.exposedports "50051" --image opm:index +umoci config --config.entrypoint "/bin/opm" --image opm:index +umoci config --config.cmd "registry" \ + --config.cmd "serve" \ + --config.cmd "--database" \ + --config.cmd "/database/index.db" \ + --image opm:index + +echo "[$(date --utc +%FT%T.%3NZ)] Publishing index to ${INDEX_DESTINATION}" +skopeo copy --authfile="${AUTH_FILE}" oci:opm:index "docker://${INDEX_DESTINATION}" + +echo "${INDEX_DESTINATION}" > "${SHARED_DIR}/oo-index-pullspec" +echo "[$(date --utc +%FT%T.%3NZ)] Wrote index pullspec to \${SHARED_DIR}/oo-index-pullspec: ${INDEX_DESTINATION}" diff --git a/ci-operator/step-registry/optional-operators/opm-index-from-bundle/optional-operators-opm-index-from-bundle-ref.metadata.json b/ci-operator/step-registry/optional-operators/opm-index-from-bundle/optional-operators-opm-index-from-bundle-ref.metadata.json new file mode 100644 index 0000000000000..a6526a1ca6e4d --- /dev/null +++ b/ci-operator/step-registry/optional-operators/opm-index-from-bundle/optional-operators-opm-index-from-bundle-ref.metadata.json @@ -0,0 +1,35 @@ +{ + "path": "optional-operators/opm-index-from-bundle/optional-operators-opm-index-from-bundle-ref.yaml", + "owners": { + "approvers": [ + "dirgim", + "jsztuka", + "14rcole", + "maneeshmehra", + "yashvardhannanavati", + "nmars", + "sonam1412", + "asergienk" + ], + "reviewers": [ + "anik120", + "awgreene", + "benluddy", + "Bowenislandsong", + "dinhxuanvu", + "ecordell", + "exdx", + "gallettilance", + "kevinrizza", + "njhale", + "dirgim", + "jsztuka", + "14rcole", + "nmars", + "maneeshmehra", + "yashvardhannanavati", + "sonam1412", + "asergienk" + ] + } +} \ No newline at end of file diff --git a/ci-operator/step-registry/optional-operators/opm-index-from-bundle/optional-operators-opm-index-from-bundle-ref.yaml b/ci-operator/step-registry/optional-operators/opm-index-from-bundle/optional-operators-opm-index-from-bundle-ref.yaml new file mode 100644 index 0000000000000..e4f222433931b --- /dev/null +++ b/ci-operator/step-registry/optional-operators/opm-index-from-bundle/optional-operators-opm-index-from-bundle-ref.yaml @@ -0,0 +1,34 @@ +ref: + as: optional-operators-opm-index-from-bundle + from: cli + commands: optional-operators-opm-index-from-bundle-commands.sh + resources: + requests: + cpu: 300m + memory: 300Mi + env: + - name: OO_BUNDLE + documentation: |- + Pullspec of an already-existing (e.g. cross-repo promoted) operator + bundle image to build a fresh index from. Required. + - name: OPM_BASE_IMAGE + documentation: |- + The base opm image to assemble the generated index database into. + default: "quay.io/operator-framework/opm:latest" + documentation: |- + Builds a fresh opm sqlite index image from an already-existing bundle + image (`OO_BUNDLE`) using `opm index add` plus rootless `umoci`/`skopeo` + image assembly (no podman/buildah, no daemon), pushes it to this job's + own namespace on the CI registry (reachable externally for the + lifetime of the job), and writes the resulting pullspec to + `${SHARED_DIR}/oo-index-pullspec` for `optional-operators-subscribe` + to consume as `OO_INDEX`. + + Use this instead of `operator-sdk run bundle` when installing from a + bundle that isn't paired with a promoted index: `operator-sdk run + bundle`'s own internal registry pod does not reliably get a + PodSecurity "restricted"-compliant securityContext on all its + containers (operator-framework/operator-sdk#7040, open upstream), + which can be rejected by namespaces enforcing PSA "restricted". + `optional-operators-subscribe`'s CatalogSource does not have this + problem (it sets `grpcPodConfig.securityContextConfig: restricted`). diff --git a/ci-operator/step-registry/optional-operators/subscribe/optional-operators-subscribe-commands.sh b/ci-operator/step-registry/optional-operators/subscribe/optional-operators-subscribe-commands.sh index d4be44e48d2b9..5570a076be6e1 100755 --- a/ci-operator/step-registry/optional-operators/subscribe/optional-operators-subscribe-commands.sh +++ b/ci-operator/step-registry/optional-operators/subscribe/optional-operators-subscribe-commands.sh @@ -166,6 +166,10 @@ if [ -n "${INITIAL_CHANNEL}" ]; then OO_CHANNEL="${INITIAL_CHANNEL}" fi +if [[ -f "${SHARED_DIR}/oo-index-pullspec" ]]; then + OO_INDEX=$(cat "${SHARED_DIR}/oo-index-pullspec") +fi + if [[ $JOB_NAME != rehearse-* ]]; then if [[ -z ${OO_INDEX:-} ]] || [[ -z ${OO_PACKAGE:-} ]] || [[ -z ${OO_CHANNEL:-} ]]; then echo "[$(date --utc +%FT%T.%3NZ)] At least of required variables OO_INDEX=${OO_INDEX:-} OO_PACKAGE=${OO_PACKAGE:-} OO_CHANNEL=${OO_CHANNEL:-} is unset"