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