Skip to content

Commit

Permalink
Upgrade OPM to 1.20.0
Browse files Browse the repository at this point in the history
  - Upgrade OPM to 1.20.0 in Dockerfile-workers
  - Replace `opm alpha generate` with `opm generate`

Refers to CLOUDDST-11845
  • Loading branch information
JAVGan committed Apr 1, 2022
1 parent aa87cca commit 41b6803
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile-workers
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN dnf -y install \
&& dnf update -y \
&& dnf clean all

ADD https://github.com/operator-framework/operator-registry/releases/download/v1.19.5/linux-amd64-opm /usr/bin/opm
ADD https://github.com/operator-framework/operator-registry/releases/download/v1.20.0/linux-amd64-opm /usr/bin/opm
RUN chmod +x /usr/bin/opm
ADD https://github.com/fullstorydev/grpcurl/releases/download/v1.8.5/grpcurl_1.8.5_linux_x86_64.tar.gz /src/grpcurl_1.8.5_linux_x86_64.tar.gz
RUN cd /usr/bin && tar -xf /src/grpcurl_1.8.5_linux_x86_64.tar.gz grpcurl && rm -f /src/grpcurl_1.8.5_linux_x86_64.tar.gz
Expand Down
1 change: 0 additions & 1 deletion iib/workers/tasks/opm_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ def opm_generate_dockerfile(fbc_dir, base_dir, index_db, binary_image, dockerfil

cmd = [
'opm',
'alpha',
'generate',
'dockerfile',
os.path.abspath(fbc_dir),
Expand Down
4 changes: 2 additions & 2 deletions tests/test_workers/test_tasks/test_opm_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def create_dockerfile(*args, **kwargs):
df_name = dockerfile if dockerfile else f"{os.path.basename(fbc_dir)}.Dockerfile"

mock_run_cmd.assert_called_once_with(
['opm', 'alpha', 'generate', 'dockerfile', fbc_dir, '--binary-image', 'some:image'],
['opm', 'generate', 'dockerfile', fbc_dir, '--binary-image', 'some:image'],
{'cwd': tmpdir},
exc_msg='Failed to generate Dockerfile for file-based catalog',
)
Expand All @@ -223,7 +223,7 @@ def test_opm_generate_dockerfile_no_dockerfile(mock_run_cmd, tmpdir, set_index_d
)

mock_run_cmd.assert_called_once_with(
['opm', 'alpha', 'generate', 'dockerfile', fbc_dir, '--binary-image', 'some:image'],
['opm', 'generate', 'dockerfile', fbc_dir, '--binary-image', 'some:image'],
{'cwd': tmpdir},
exc_msg='Failed to generate Dockerfile for file-based catalog',
)
Expand Down

0 comments on commit 41b6803

Please sign in to comment.