Skip to content

Commit

Permalink
Work around operator-sdk olm install bug
Browse files Browse the repository at this point in the history
Signed-off-by: Maurizio Porrato <[email protected]>
  • Loading branch information
mporrato committed Jul 6, 2023
1 parent 253818b commit 6b55638
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions upstream/roles/reset_kind/tasks/reset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,21 @@
- not rkr_osdk.stat.exists
- run_upstream|bool

- name: "Uninstalling any existing OLM version"
shell: "{{ operator_sdk_bin_path }} olm uninstall --timeout 5m0s"
ignore_errors: true
- name: "Download OLM {{ olm_version }} installer"
get_url:
url: "https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v{{ olm_version }}/install.sh"
dest: /tmp/olm-install.sh
mode: "0755"
register: olm_install_download_result
until: olm_install_download_result.status_code is defined and olm_install_download_result.status_code == 200
retries: "{{ default_retries }}"
delay: "{{ default_delay }}"
failed_when: olm_install_download_result is failure

- name: "Installing OLM ({{ olm_version }})"
shell: "{{ operator_sdk_bin_path }} olm install --version {{ olm_version }} --timeout 5m0s"
# Install olm using the install script instead of `operator-sdk olm install`
# to work around operator-sdk bug https://github.com/operator-framework/operator-lifecycle-manager/issues/2968
shell: "/tmp/olm-install.sh v{{ olm_version }}"
register: olm_install_rc
tags:
- always
Expand Down

0 comments on commit 6b55638

Please sign in to comment.