From 6e7a52b87f579bf6c7cf9696cdf3d228c63efe79 Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Tue, 19 Feb 2019 16:51:43 +0100 Subject: [PATCH] CI: do not rebuild the image for regular MR or pushes We better not rebuild the image in regular operations unless there is a strong need for it. We can however set up a scheduled pipeline to rebuild the images once a week or once a month in the upstream repo, and the forks will fetch those new images when they need. Signed-off-by: Benjamin Tissoires (cherry picked from commit 51e66ab945af400c05a7c50814917e84ddf71a42) --- .gitlab-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6f8f3098..5fa5a2de 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -147,8 +147,8 @@ variables: LOCAL_IMG_SECS=UPSTREAM_IMG_SECS ; fi - # check if image is less than a week old - - test $(($LOCAL_IMG_SECS + 604800)) -gt $TODAY_SECS && exit 0 + # if the image exists and we are not in the scheduled pipeline, exit + - test $LOCAL_IMG_SECS -gt 0 -a $CI_PIPELINE_SOURCE != "schedule" && exit 0 fedora:28@container-prep: @@ -307,6 +307,8 @@ freebsd:11.2@container-prep: ;done dependencies: [] allow_failure: true + only: + - schedules fedora:28@container-clean: extends: .container-clean