tmt: copy the artifacts over

This commit is contained in:
Davide Cavalca 2023-12-18 16:05:35 -08:00
parent 7a23258337
commit 9bd4af2286
5 changed files with 32 additions and 0 deletions

View File

@ -188,6 +188,23 @@ def packageUpload(target):
uploadToS3(manifest, f"os/{manifest}") uploadToS3(manifest, f"os/{manifest}")
def tmtCopy(target):
base = f"fedora-{RELEASE}-{target['id']}-{BUILDVER}"
package = f"{base}.zip"
logs_package = f"{base}.logs.zip"
image = f"{base}.raw.zst"
manifest = f"{base}.json"
artifacts = os.getenv("TMT_PLAN_DATA")
if not os.path.exists(artifacts):
os.mkdir(artifacts)
shutil.copyfile(package, f"{artifacts}/{package}")
shutil.copyfile(logs_package, f"{artifacts}/{logs_package}")
shutil.copyfile(image, f"{artifacts}/{image}")
shutil.copyfile(manifest, f"{artifacts}/{manifest}")
def getManifest(): def getManifest():
if S3_BUCKET is None: if S3_BUCKET is None:
fail("S3_BUCKET is not set") fail("S3_BUCKET is not set")
@ -250,6 +267,17 @@ def upload(manifest, target):
uploadToS3("merged_installer_data.json", MANIFEST) uploadToS3("merged_installer_data.json", MANIFEST)
@cli.command()
@click.argument("target")
def tmt(target):
if target not in TARGETS.keys():
fail(f"Unknown target: {target}")
target = TARGETS[target]
tmtCopy(target)
@cli.command() @cli.command()
@click.option("--update/--no-update", default=False) @click.option("--update/--no-update", default=False)
@click.option("--upload/--no-upload", default=False) @click.option("--upload/--no-upload", default=False)

View File

@ -8,6 +8,7 @@ discover:
setenforce 0 setenforce 0
$TMT_TREE/builder.py build gnome $TMT_TREE/builder.py build gnome
$TMT_TREE/builder.py package gnome $TMT_TREE/builder.py package gnome
$TMT_TREE/builder.py tmt gnome
setenforce 1 setenforce 1
execute: execute:

View File

@ -8,6 +8,7 @@ discover:
setenforce 0 setenforce 0
$TMT_TREE/builder.py build kde $TMT_TREE/builder.py build kde
$TMT_TREE/builder.py package kde $TMT_TREE/builder.py package kde
$TMT_TREE/builder.py tmt kde
setenforce 1 setenforce 1
execute: execute:

View File

@ -8,6 +8,7 @@ discover:
setenforce 0 setenforce 0
$TMT_TREE/builder.py build minimal $TMT_TREE/builder.py build minimal
$TMT_TREE/builder.py package minimal $TMT_TREE/builder.py package minimal
$TMT_TREE/builder.py tmt minimal
setenforce 1 setenforce 1
execute: execute:

View File

@ -8,6 +8,7 @@ discover:
setenforce 0 setenforce 0
$TMT_TREE/builder.py build server $TMT_TREE/builder.py build server
$TMT_TREE/builder.py package server $TMT_TREE/builder.py package server
$TMT_TREE/builder.py tmt server
setenforce 1 setenforce 1
execute: execute: