-
Notifications
You must be signed in to change notification settings - Fork 61
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
New release #202
Comments
SGTM |
Seems like the |
Yeah it is caused by the wrong go version I think. I will try to fix it. |
Tested the new release, works like a charm! Thank you @gaocegege, would it be possible to also make a new release of the python sdk to pypi too? |
SGTM. Will do it soon. |
On my side, I re-implemented the class ORMBLoginError(Exception):
def __init__(self, registry_name: str, username: str, stderr: str) -> None:
msg = f"Login to {registry_name} as '{username}' failed with stderr:\n{stderr}"
super().__init__(msg)
def login(
hostname: str,
username: str,
password: str,
registry_name: str,
) -> subprocess.CompletedProcess:
"""
Logs in an image registry by running ORMB CLI `login` command in a subprocess.
Args:
hostname: Remote registry to authenticate to.
username: Username to authenticate with.
password: Password to authenticate with.
registry_name: Name of the registry for error logs.
Returns:
The completed process.
Raises:
ORMBLoginError: ORMB login command process exited with a non-zero exit code.
"""
args = [
BIN_PATHNAME,
"login",
hostname,
"--username",
username,
"--password-stdin",
"--insecure",
"False",
]
try:
return subprocess.run(
args=args,
capture_output=True,
check=True,
input=password,
text=True,
)
except subprocess.CalledProcessError as e:
raise _cli_api_exceptions.ORMBLoginError(
registry_name=registry_name,
username=username,
stderr=e.stderr,
) If you want I could create a PR this weekend to enhance the |
I think it works for me! Thanks for the PR! |
Thx @gaocegege! Tested locally 🚀 |
The last release (0.0.11) was done a year ago now. New commits have been made since, I think it would be nice to have a new release of both ORMB and the python sdk. Does someone have to bandwith for it?
The text was updated successfully, but these errors were encountered: