CI: add image-metrics job
What does this MR do?
CI: add image-metrics job
Add a metrics job to the pipeline, in final-list
stage.
Ideally, this produces consumable CI metrics reports per https://docs.gitlab.com/ee/ci/metrics_reports.html, making it very easy to see size changes as a result of pipeline runs.
This job generates OpenMetrics formatted data about containers built in a pipeline.
# TYPE container_total_size gauge
# UNIT container_total_size bytes
# HELP container_size Size of container in bytes
# TYPE container_layers gauge
# UNIT container_layers number
# HELP container_layers Number of layers in container
container_total_size{image="alpine-certificates:master"} 3
container_layers{image="alpine-certificates:master"} 3098169
This data is pulled via skopeo inspect --raw
, based on the image name and tag stored in artifacts/final/*.txt
populated during build_if_needed
of build-scripts/build.sh
.
The job is designed to only run against the public repository at this time.
Related
Expands on !857 (merged)
Related to gitlab-org/charts/gitlab#1267 (closed)
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion
Required
-
Merge Request Title, and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Integration tests added to GitLab QA -
The impact any change in container size has should be evaluated