Skip to content

Commit

Permalink
Use container_registry config for podman login and push (#2213)
Browse files Browse the repository at this point in the history
use container_registry for podman login and push

No-Issue
  • Loading branch information
jerabekjiri authored Aug 6, 2024
1 parent 2031aa0 commit 0bbca39
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions galaxy_ng/tests/integration/api/test_container_signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,21 @@ def test_gw_push_and_sign_a_container(ansible_config, flags, galaxy_client):
pytest.skip("GALAXY_CONTAINER_SIGNING_SERVICE is not configured")

config = ansible_config("admin")
url = config['url']
parsed_url = urlparse(url)
cont_reg = parsed_url.netloc

container_engine = config["container_engine"]
container_registry = config["container_registry"]

# Pull alpine image
pull_and_tag_test_image(container_engine, cont_reg)
pull_and_tag_test_image(container_engine, container_registry)

# Login to local registry with tls verify disabled
cmd = [container_engine, "login", "-u", f"{config['username']}", "-p",
f"{config['password']}", f"{config['url'].split(parsed_url.path)[0]}"]
f"{config['password']}", container_registry]
if container_engine == 'podman':
cmd.append("--tls-verify=false")
subprocess.check_call(cmd)

# Push image to local registry
cmd = [container_engine, "push", f"{cont_reg}/alpine:latest"]
cmd = [container_engine, "push", f"{container_registry}/alpine:latest"]
if container_engine == 'podman':
cmd.append("--tls-verify=false")
subprocess.check_call(cmd)
Expand Down

0 comments on commit 0bbca39

Please sign in to comment.