Include source image in built image metadata
I was trying to find which image a hpc-factory built image was based on and could not find it. It's not in metadata and it's not shown in the pipeline output anywhere.
Example image:
$ openstack image show fc3147ca-2edb-4108-8a77-438b40b71e6d
+------------------+--------------------------------------------------------------------------------------------------------------+
| Field | Value |
+------------------+--------------------------------------------------------------------------------------------------------------+
| checksum | 3e6aaa1a70634a9bc82535f8b7dfc0e9 |
| container_format | bare |
| created_at | 2025-01-16T22:39:50Z |
| disk_format | qcow2 |
| file | /v2/images/fc3147ca-2edb-4108-8a77-438b40b71e6d/file |
| id | fc3147ca-2edb-4108-8a77-438b40b71e6d |
| min_disk | 0 |
| min_ram | 0 |
| name | http-proxy-2025-01-16T163029 |
| owner | f642e2eda9a24b2ca6dbd944b20bf4cf |
| properties | EXT_PR_SRC_BRANCH_SHA='fb5d760', EXT_PR_SRC_REPO='https://github.com/jprorama/CRI_XCBC.git', |
| | EXT_PR_TARGET_BRANCH_SHA='01699a7', EXT_PR_TARGET_REPO='https://github.com/uabrc/CRI_XCBC.git', |
| | PACKER_IMAGE_HEAD='91c02c7', direct_url='rbd://736271ac- |
| | aba3-11ed-8e95-1111371d7b1d/glance/fc3147ca-2edb-4108-8a77-438b40b71e6d/snap', image_type='image', |
| | locations='[{'url': 'rbd://736271ac- |
| | aba3-11ed-8e95-1111371d7b1d/glance/fc3147ca-2edb-4108-8a77-438b40b71e6d/snap', 'metadata': {'store': |
| | 'ceph'}}]', os_hash_algo='sha512', os_hash_value='e0072c9421756e89cd4751c8bd741c3a00d89cb0bdd41334cc387fc98d |
| | 1746228f5a79613a7ec5f61324a08d6c2f215ed6bff7f9dbb9a0c3ea07ac44205568e1', os_hidden='False', |
| | signature_verified='False', stores='ceph' |
| protected | False |
| schema | /v2/schemas/image |
| size | 1178468352 |
| status | active |
| tags | |
| updated_at | 2025-01-16T22:45:17Z |
| virtual_size | 21474836480 |
| visibility | shared |
+------------------+--------------------------------------------------------------------------------------------------------------+
Pipeline output of the mentioned image: https://code.rc.uab.edu/rc/hpc-factory/-/jobs/52145
We have a few options to achieve this, we can implement one or all of these in the cicd pipeline.
- We can print it out in the pipeline so it shows in the pipeline logs
- We can copy it to artifacts and download it to find that info
- We can include that info in the properties of the image and find it with
openstack image show <img-id>
We need to pick one out of these.
Edited by Eesaan Atluri