debian-forge-composer/internal/target
Tomáš Hozza efbaa93eef Target/Koji: rework result options to contain more than just image info
The `KojiTargetResultOptions` previously contained information only
about the uploaded image file. And even then, some information, such as
the filename, were scattered in other structures such as
`KojiFinalizeJob` struct.

Since the plan is to start uploading also osbuild manifest and osbuild
build log to Koji, we need to extend the result options structure to
hold more information and also make it specific to which file is the
information related.

Rework the `KojiTargetResultOptions` to contain information about:
 - the built image
 - build log
 - osbuild manifest

Information about each file contains:
 - filename
 - checksum type
 - file checksum
 - file size

For now, only the built image information is set and consumed by the
worker.

Add custom JSON (un)marshaler for `KojiTargetResultOptions` to handle
backward compatibility when old version of worker or composer server
interact with each other. Cover them with unit tests.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-09-27 12:39:28 +02:00
..
aws_target.go AWS: extend target options with the AMI boot mode 2023-05-19 13:24:39 +02:00
azure_image_target.go internal/target/azure_image: mark Location as optional 2022-10-27 19:33:43 +02:00
azure_target.go target: move Filename from target options to Target 2022-07-01 18:55:01 +01:00
container_target.go cloudapi: add support for uploading to a container registry 2022-08-01 21:50:03 +01:00
gcp_target.go internal/target/gcp: make Bucket optional 2022-10-11 13:23:18 +02:00
koji_target.go Target/Koji: rework result options to contain more than just image info 2023-09-27 12:39:28 +02:00
koji_target_test.go Target/Koji: rework result options to contain more than just image info 2023-09-27 12:39:28 +02:00
local_target.go target: deprecate local target and don't use it anywhere 2022-07-01 18:55:01 +01:00
oci_target.go internal/target: add OCI object storage target 2023-09-19 22:57:06 +02:00
target.go internal/target: add OCI object storage target 2023-09-19 22:57:06 +02:00
target_test.go worker: move osbuild exports from OSBuildJob to target 2022-07-01 18:55:01 +01:00
targetresult.go internal/target: add OCI object storage target 2023-09-19 22:57:06 +02:00
targetresult_test.go Target/Koji: rework result options to contain more than just image info 2023-09-27 12:39:28 +02:00
vmware_target.go internal/vmware: add support for the GOVC_FOLDER option 2023-05-25 10:14:32 +02:00
worker_server_target.go target: add explicit target for uploading back to worker server 2022-07-01 18:55:01 +01:00