astronomer/ap-airflow

Add info steps after docker build

danielhoherd opened this issue · 0 comments

Description

One thing that has been useful elsewhere and seems useful here is to add some info steps to CI after docker build. For instance we've done docker inspect afterwards to show metadata about the build. The build URL shows up in the metadata of a docker image, which makes a nice chain to follow to get info.

Example

https://quay.io/repository/astronomer/ap-airflow/manifest/sha256:23ccc960a0db114aadfa27d81f7bb7f947c576c45269340f0b7a8bf365ad9567 shows < io.astronomer.ci.build_url=https://circleci.com/gh/astronomer/ap-airflow/44315>, and if we go there, it would be great to see things like docker inspect and pip freeze and stuff, in order to know which components were included in that built docker image.

References

https://quay.io/repository/astronomer/ap-base/manifest/sha256:ba3b7812f0091cead3bc674d24ad9cce95a2d706f1be9c33cdac57f18139a221 shows < io.astronomer.build.url=https://circleci.com/gh/astronomer/ap-base/512> which shows docker inspect output https://app.circleci.com/pipelines/github/astronomer/ap-base/113/workflows/29aea806-ebbc-4203-95c7-f10e2eca93e1/jobs/512/parallel-runs/0/steps/0-103

Reasoning

Today I was trying to find a list of packages that were contained in a docker image, and this seems like a good method for having a historical record of that information.