From: Peter Hutterer Date: Thu, 2 Jul 2020 22:50:54 +0000 (+1000) Subject: gitlab CI: drop custom scheduled handling, set FDO_FORCE_REBUILD instead X-Git-Tag: 1.15.901~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ce05ca4a5554e400c5ae5eba2c85cc43b056bbe;p=platform%2Fupstream%2Flibinput.git gitlab CI: drop custom scheduled handling, set FDO_FORCE_REBUILD instead This is a leftover from pre-ci-templates days. Now that ci-templates handles FDO_FORCE_REBUILD remove the custom handling and for the weekly rebuild just set that variable to 1 in the scheduled pipeline itself. Signed-off-by: Peter Hutterer --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a4f86c..c2b4ef1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -185,20 +185,13 @@ check-merge-request: allow_failure: true # -# This stage will recreate the container images only if the image -# is too old or if it is missing some dependencies. +# Note: images are rebuilt weekly with a scheduled pipeline with FDO_FORCE_REBUILD set +# # - -.rebuild_for_schedule: - before_script: - # force rebuild if schedule, reuse otherwise - - if [[ $CI_PIPELINE_SOURCE == "schedule" ]] ; then export FDO_FORCE_REBUILD=1; fi - fedora:32@qemu-prep: extends: - .fdo.qemu-build@fedora - .policy - - .rebuild_for_schedule stage: prep tags: - kvm @@ -213,7 +206,6 @@ fedora:30@container-prep: extends: - .fdo.container-build@fedora - .policy - - .rebuild_for_schedule stage: prep variables: GIT_STRATEGY: none @@ -225,7 +217,6 @@ fedora:31@container-prep: extends: - .fdo.container-build@fedora - .policy - - .rebuild_for_schedule stage: prep variables: GIT_STRATEGY: none @@ -237,7 +228,6 @@ fedora:32@container-prep: extends: - .fdo.container-build@fedora - .policy - - .rebuild_for_schedule stage: prep variables: GIT_STRATEGY: none @@ -249,7 +239,6 @@ ubuntu:19.10@container-prep: extends: - .fdo.container-build@ubuntu - .policy - - .rebuild_for_schedule stage: prep variables: GIT_STRATEGY: none @@ -261,7 +250,6 @@ arch:rolling@container-prep: extends: - .fdo.container-build@arch - .policy - - .rebuild_for_schedule stage: prep variables: GIT_STRATEGY: none @@ -273,7 +261,6 @@ alpine:latest@container-prep: extends: - .fdo.container-build@alpine - .policy - - .rebuild_for_schedule stage: prep variables: GIT_STRATEGY: none @@ -298,16 +285,15 @@ alpine:latest@container-prep: # get the full container image name - export IMAGE=freebsd/$FREEBSD_VERSION:$FREEBSD_TAG - # force rebuild if schedule, reuse otherwise - - if [[ $CI_PIPELINE_SOURCE == "schedule" ]] ; then touch .scheduled; fi + - if [[ x"$FDO_FORCE_REBUILD" != x ]] ; then touch .rebuild; fi # pull the latest upstream image if it exists - - test -e .scheduled || skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD + - test -e .rebuild || skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD docker://$CI_REGISTRY/$FDO_UPSTREAM_REPO/$IMAGE docker://$CI_REGISTRY_IMAGE/$IMAGE && exit 0 || true ; # check if our image is already in the current registry - - test -e .scheduled || skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ; + - test -e .rebuild || skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ; - export BUILDAH_RUN="buildah run --isolation chroot" - export BUILDAH_COMMIT="buildah commit --format docker" diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index afed01b..79b470a 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -181,15 +181,9 @@ check-merge-request: allow_failure: true # -# This stage will recreate the container images only if the image -# is too old or if it is missing some dependencies. +# Note: images are rebuilt weekly with a scheduled pipeline with FDO_FORCE_REBUILD set +# # - -.rebuild_for_schedule: - before_script: - # force rebuild if schedule, reuse otherwise - - if [[ $CI_PIPELINE_SOURCE == "schedule" ]] ; then export FDO_FORCE_REBUILD=1; fi - {# qemu builds are only done for the latest version of any distribution #} {% for distro in distributions if distro.want_qemu %} {% set version = "{}".format(distro.versions|last()) %} @@ -197,7 +191,6 @@ check-merge-request: extends: - .fdo.qemu-build@{{distro.name}} - .policy - - .rebuild_for_schedule stage: prep tags: - kvm @@ -215,7 +208,6 @@ check-merge-request: extends: - .fdo.container-build@{{distro.name}} - .policy - - .rebuild_for_schedule stage: prep variables: GIT_STRATEGY: none @@ -245,16 +237,15 @@ check-merge-request: # get the full container image name - export IMAGE=freebsd/$FREEBSD_VERSION:$FREEBSD_TAG - # force rebuild if schedule, reuse otherwise - - if [[ $CI_PIPELINE_SOURCE == "schedule" ]] ; then touch .scheduled; fi + - if [[ x"$FDO_FORCE_REBUILD" != x ]] ; then touch .rebuild; fi # pull the latest upstream image if it exists - - test -e .scheduled || skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD + - test -e .rebuild || skopeo copy --dest-creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD docker://$CI_REGISTRY/$FDO_UPSTREAM_REPO/$IMAGE docker://$CI_REGISTRY_IMAGE/$IMAGE && exit 0 || true ; # check if our image is already in the current registry - - test -e .scheduled || skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ; + - test -e .rebuild || skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ; - export BUILDAH_RUN="buildah run --isolation chroot" - export BUILDAH_COMMIT="buildah commit --format docker"