[igt-dev] [PATCH v2 2/3] gitlab-ci: rebuild images only on Dockerfile changes

Arkadiusz Hiler arkadiusz.hiler at intel.com
Thu Aug 22 08:26:46 UTC 2019


On Tue, Aug 20, 2019 at 04:19:35PM +0300, Oleg Vasilev wrote:
> Base images rarely change, there is not much sense in rebuilding it on
> every commit. GitLab already has mechanism for detecting such changes.
> However, it is only able to prevent rebuilding whenever there is no
> changes within the same ref. Since in our CI system, git tag is created
> on every series, the mechanism doesn't work.
> 
> One possible way to workaround that is to compute a checksum of a
> Dockerfile, and rebuilding only if there was no image built with the
> same checksum.
> 
> Signed-off-by: Oleg Vasilev <oleg.vasilev at intel.com>
> ---
>  .gitlab-ci.yml             | 39 +++++------------------------
>  scripts/pull-or-rebuild.sh | 50 ++++++++++++++++++++++++++++++++++++++

I would hide this helper a bit since it's only for gitlab pipeline.

How about .gitlab-ci/ ?

Other than that:
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>




More information about the igt-dev mailing list