Skip to content

Commit

Permalink
Use operator namespace for signing when it's available in target sett…
Browse files Browse the repository at this point in the history
…ings (#257)
  • Loading branch information
midnightercz authored May 17, 2024
1 parent a1afde8 commit 5996f52
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 3 additions & 1 deletion pubtools/_quay/iib_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ def _index_image_to_sign_entries(
if internal:
dest_registries = ["quay.io"]
iib_repo = (
target_settings["quay_namespace"] + "/" + get_internal_container_repo_name(iib_repo)
target_settings.get("quay_operator_namespace", target_settings["quay_namespace"])
+ "/"
+ get_internal_container_repo_name(iib_repo)
)

dest_operator_quay_client = _get_operator_quay_client(target_settings)
Expand Down
16 changes: 8 additions & 8 deletions tests/test_iib_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,10 +626,10 @@ def test_task_iib_add_bundles_operator_ns(
config_file="test-config.yml",
signing_key="some-key",
reference=[
"quay.io/some-namespace/operators----index-image:8",
"quay.io/some-namespace/operators----index-image:8-timestamp",
"quay.io/some-namespace/operators----index-image:8",
"quay.io/some-namespace/operators----index-image:8-timestamp",
"quay.io/operator-ns/operators----index-image:8",
"quay.io/operator-ns/operators----index-image:8-timestamp",
"quay.io/operator-ns/operators----index-image:8",
"quay.io/operator-ns/operators----index-image:8-timestamp",
],
digest=[
"sha256:a1a1a1",
Expand Down Expand Up @@ -1548,10 +1548,10 @@ def test_task_iib_build_from_scratch_operator_ns(
config_file="test-config.yml",
signing_key="some-key",
reference=[
"quay.io/some-namespace/operators----index-image:8",
"quay.io/some-namespace/operators----index-image:8-timestamp",
"quay.io/some-namespace/operators----index-image:8",
"quay.io/some-namespace/operators----index-image:8-timestamp",
"quay.io/operator-ns/operators----index-image:8",
"quay.io/operator-ns/operators----index-image:8-timestamp",
"quay.io/operator-ns/operators----index-image:8",
"quay.io/operator-ns/operators----index-image:8-timestamp",
],
digest=[
"sha256:a1a1a1",
Expand Down

0 comments on commit 5996f52

Please sign in to comment.