mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-05 00:23:33 +01:00
61d74b9da1
Fix #18788 Signed-off-by: Yang Jiao <jiaoya@vmware.com>
19 lines
518 B
Python
19 lines
518 B
Python
# -*- coding: utf-8 -*-
|
|
import base
|
|
|
|
def login(registry, username, password):
|
|
command = ["podman", "login", "-u", username, "-p", password, registry]
|
|
base.run_command(command)
|
|
|
|
def logout(registry):
|
|
command = ["podman", "logout", registry]
|
|
base.run_command(command)
|
|
|
|
def pull(artifact):
|
|
command = ["podman", "pull", artifact]
|
|
base.run_command(command)
|
|
|
|
def push(source_artifact, target_artifact):
|
|
command = ["podman", "push", source_artifact, target_artifact]
|
|
base.run_command(command)
|