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

Add automated test #1

Open
manics opened this issue Nov 7, 2023 · 0 comments
Open

Add automated test #1

manics opened this issue Nov 7, 2023 · 0 comments

Comments

@manics
Copy link
Owner

manics commented Nov 7, 2023

  • Setup two registries (one for caching, one for the final image) with credentials
  • run repo2docker --engine=kaniko ...
  • Check the cache contains something
  • Check the final image is pushed to the other registry

e.g. using https://github.com/yodle/docker-registry-client

#!/usr/bin/env python

from docker_registry_client import DockerRegistryClient

REGISTRY = "http://localhost:5000"

client = DockerRegistryClient(REGISTRY)
repositories = client.repositories()
print("Repositories:")
for r in repositories:
    print(f"  {r}")

if "cache" in repositories:
    print("cache tags:")
    cache = client.repository("cache")
    tags = cache.tags()
    cache_manifests = dict((t, cache.manifest(t)) for t in tags)
    for t, manifest in cache_manifests.items():
        print(f"  {t}: {manifest}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant