Skip to content

Commit

Permalink
Get opm for getting bundles information
Browse files Browse the repository at this point in the history
We need opm to get the bundle version when deploying
from index with pre-built bundles

Get opm following the same logic we use for operator-sdk
  • Loading branch information
vkmc committed Jul 8, 2024
1 parent 49dabbf commit 642df50
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
16 changes: 16 additions & 0 deletions build/get_opm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -x

REL=$(dirname "$0")
VERSION="$1"
OPM_DL_URL=https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/${VERSION}

if [[ ! -f ${REL}/working/opm-${VERSION} ]]; then
mkdir -p ${REL}/working
curl -L ${OPM_DL_URL}/opm-linux-${VERSION}.tar.gz -o ${REL}/working/opm-${VERSION}
chmod +x ${REL}/working/opm-${VERSION}
rm -f ${REL}/working/opm-linux-${VERSION}.tar.gz
fi

set +x
7 changes: 7 additions & 0 deletions build/stf-run-ci/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@
creates: "{{ base_dir }}/working/operator-sdk-{{ operator_sdk_v1 }}"
chdir: "{{ base_dir }}"

- name: Get opm (deploy from index with pre-built bundles)
when: __deploy_from_bundles_enabled | bool and __deploy_from_index_enabled | bool
ansible.builtin.command:
cmd: "{{ base_dir }}/get_opm.sh {{ ocp_version }}"
creates: "{{ base_dir }}/working/opm-{{ ocp_version }}"
chdir: "{{ base_dir }}"

- name: Set logfile_dir
when: not (logfile_dir is defined)
ansible.builtin.set_fact:
Expand Down

0 comments on commit 642df50

Please sign in to comment.