[igt-dev] [PATCH v3 5/6] gitlab-ci: rebuild images only on Dockerfile changes

Arkadiusz Hiler arkadiusz.hiler at intel.com
Mon Aug 26 13:38:50 UTC 2019


On Mon, Aug 26, 2019 at 04:12:47PM +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 +++++----------------------
>  gitlab-ci/pull-or-rebuild.sh | 51 ++++++++++++++++++++++++++++++++++++

Please use `.gitlab-ci/` so it's consistent with .gitlab-ci.yml and what
others[0] are doing.

[0]: https://gitlab.freedesktop.org/mesa/mesa/tree/master/.gitlab-ci

-- 
Cheers,
Arek


More information about the igt-dev mailing list