diff --git a/upstream/roles/build_app_registry/tasks/main.yml b/upstream/roles/build_app_registry/tasks/main.yml index 1dfd697c0..4518e3c25 100644 --- a/upstream/roles/build_app_registry/tasks/main.yml +++ b/upstream/roles/build_app_registry/tasks/main.yml @@ -58,8 +58,48 @@ - name: "Building and pushing app registry" block: - - name: "Build app registry image '{{ app_registry_image }}' using '{{ app_registry_build_file }}'" - shell: "{{ container_tool }} build --no-cache -t {{ app_registry_image }} -f {{ app_registry_build_dir }}/{{ app_registry_build_file }} {{ bundle_export_dir_app_registry | dirname }}" + - name: "Build app registry image '{{ app_registry_image }}' using '{{ app_registry_build_file }}' (!)" + shell: | + podman info + sudo df -h + podman system reset -f + sudo mkdir -p /mnt/storage /mnt/rundir /mnt/tmp + sudo chown "$(id -u):$(id -g)" /mnt/storage /mnt/rundir + sudo chmod 1777 /mnt/tmp + sudo chmod 1777 /mnt/rundir + sudo chmod 1777 /mnt/storage + export TMPDIR=/mnt/tmp + export BUILDAH_LAYERS=true + cat <<__EOF__ >/usr/share/containers/storage.conf + [storage] + graphroot = "/mnt/storage" + driver = "overlay" + runroot = "/mnt/rundir" + + [storage.options] + pull_options = {enable_partial_images = "true", use_hard_links = "true", ostree_repos=""} + + [storage.options.overlay] + mountopt = "nodev" + __EOF__ + cat <<__EOF__ | sudo tee /etc/containers/containers.conf + [engine] + env = ["TMPDIR=/mnt/tmp"] + __EOF__ + + cat /usr/share/containers/storage.conf + ls /tmp/community-operators-for-catalog/upstream.Dockerfile + ls /tmp/operator-test/app_registry + ls /mnt + + # set +e + # "{{ container_tool }} build --log-level=debug -t {{ app_registry_image }} -f {{ app_registry_build_dir }}/{{ app_registry_build_file }} {{ bundle_export_dir_app_registry | dirname }}" + # result=$? + # podman info + # sudo df -h + # exit $result + - name: next step + shell: "{{ container_tool }} build {{ extra_params }} --no-cache -t {{ app_registry_image }} -f {{ app_registry_build_dir }}/{{ app_registry_build_file }} {{ bundle_export_dir_app_registry | dirname }}" - name: "Push app registry image '{{ app_registry_image }}'" shell: "{{ container_tool }} push {{ container_push_extra }} {{ app_registry_image }}" diff --git a/upstream/roles/test_operator_update/tasks/main.yml b/upstream/roles/test_operator_update/tasks/main.yml index d20361c23..01608de09 100644 --- a/upstream/roles/test_operator_update/tasks/main.yml +++ b/upstream/roles/test_operator_update/tasks/main.yml @@ -52,6 +52,7 @@ set_fact: tou_operator_bundle_for_install: "{{ production_registry_namespace }}/{{ operator_package_name }}:v{{ tou_upgrade_from }}" tou_operator_bundle_for_upgrade: "{{ tou_local_registry_namespace }}/{{ operator_package_name }}:v{{ tou_upgrade_to }}" + tou_operator_bundle_for_upgrade_external: "{{ production_registry_namespace }}/{{ operator_package_name }}:v{{ tou_upgrade_to }}" when: - cluster_type is defined - cluster_type == "k8s" @@ -60,6 +61,7 @@ set_fact: tou_operator_bundle_for_install: "{{ external_production_registry_namespace }}/{{ operator_package_name }}:v{{ tou_upgrade_from }}" tou_operator_bundle_for_upgrade: "quay.io/{{ test_quay_namespace }}/{{ operator_package_name }}:{{ commit_tag }}" + tou_operator_bundle_for_upgrade_external: "{{ external_production_registry_namespace }}/{{ operator_package_name }}:v{{ tou_upgrade_to }}" when: (cluster_type is not defined) or (cluster_type != "k8s") - name: "Check if OLM is needed" @@ -89,6 +91,16 @@ - name: "Create namespace for upgrade tests" shell: "{{ oc_bin_path }} create ns {{ tou_namespace_for_upgrades }}" + - name: "Check if {{ tou_operator_bundle_for_upgrade }} exists" + shell: "skopeo inspect docker://{{ tou_operator_bundle_for_upgrade }}" + register: inspect_bundle_for_upgrade + ignore_errors: true + + - name: "Import {{ tou_operator_bundle_for_upgrade }}" + shell: "skopeo copy docker://{{ tou_operator_bundle_for_upgrade_external }} docker://{{ tou_operator_bundle_for_upgrade }}" + when: + - inspect_bundle_for_upgrade is failed + - name: "Installing {{ tou_operator_bundle_for_install }} with {{ sdk_version_for_upgrade.stdout }}" shell: "{{ operator_sdk_bin_path }} run bundle {{ tou_operator_bundle_for_install }} -n {{ tou_namespace_for_upgrades }} --skip-tls-verify" register: tou_n_1_rc