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

Arkadiusz Hiler
2019-08-22T08:26:56Z

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@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@intel.com>