harbor/tests/apitests/python/library/cosign.py
Yang Jiao d130e7bb5b
[cherry-pick]Update e2e engine image (#18749)
Update e2e engine image

1. Update containerd version to 1.7.1
2. Update docker compose version to 2.18.1
3. Update helm version to 3.12.0
4. Update ORAS version to 1.0.0
5. Update CNAB version to 0.4.0
6. Update imgpkg version to 0.36.2
7. Update cosign version to 2.0.2
8. Update docker version to 24.0.2
9. Update chromedriver version to 114.0.5735.16

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
2023-05-30 16:50:12 +08:00

11 lines
299 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", "-y", "--allow-insecure-registry", "--key", "cosign.key", artifact]
base.run_command(command)