mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-18 16:25:16 +01:00
5f7f6c7d59
Signed-off-by: Yang Jiao <jiaoya@vmware.com>
11 lines
293 B
Python
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)
|