Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use container_registry config for podman login and push #2213

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading