harbor/tests/apitests/python/library/cosign.py
Yang Jiao 5f7f6c7d59 Add cosign Artifact API test case
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2022-01-20 02:48:56 +00:00

11 lines
293 B
Python

# -*- coding: utf-8 -*-
import base
def generate_key_pair():
command = ["cosign", "generate-key-pair"]
base.run_command(command)
def sign_artifact(artifact):
command = ["cosign", "sign", "--allow-insecure-registry", "--key", "cosign.key", artifact]
base.run_command(command)