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>
This commit is contained in:
parent
27f98ec313
commit
efbaa93eef
7 changed files with 336 additions and 30 deletions
|
|
@ -124,10 +124,11 @@ type KojiInitJobResult struct {
|
|||
}
|
||||
|
||||
type KojiFinalizeJob struct {
|
||||
Server string `json:"server"`
|
||||
Name string `json:"name"`
|
||||
Version string `json:"version"`
|
||||
Release string `json:"release"`
|
||||
Server string `json:"server"`
|
||||
Name string `json:"name"`
|
||||
Version string `json:"version"`
|
||||
Release string `json:"release"`
|
||||
// TODO: eventually deprecate and remove KojiFilenames, since the image filenames are now set in the KojiTargetResultOptions.
|
||||
KojiFilenames []string `json:"koji_filenames"`
|
||||
KojiDirectory string `json:"koji_directory"`
|
||||
TaskID uint64 `json:"task_id"` /* https://pagure.io/koji/issue/215 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue