2019-08-09 04:50:06 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import subprocess
|
2020-08-09 09:10:00 +02:00
|
|
|
from testutils import notary_url
|
2019-08-09 04:50:06 +02:00
|
|
|
|
|
|
|
def sign_image(registry_ip, project_name, image, tag):
|
|
|
|
try:
|
2020-08-09 09:10:00 +02:00
|
|
|
ret = subprocess.check_output(["./tests/apitests/python/sign_image.sh", registry_ip, project_name, image, tag, notary_url], shell=False)
|
|
|
|
print("sign_image return: ", ret)
|
|
|
|
except subprocess.CalledProcessError as exc:
|
2019-08-09 04:50:06 +02:00
|
|
|
raise Exception("Failed to sign image error is {} {}.".format(exc.returncode, exc.output))
|
|
|
|
|