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 <benjamin.tissoires@gmail.com>
(cherry picked from commit 51e66ab945)
This commit is contained in:
Benjamin Tissoires 2019-02-19 16:51:43 +01:00 committed by Peter Hutterer
parent ca0a00d31f
commit 6e7a52b87f

View file

@ -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