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
extends:
- .fdo.container-build@fedora
- .policy
- - .rebuild_for_schedule
stage: prep
variables:
GIT_STRATEGY: none
extends:
- .fdo.container-build@fedora
- .policy
- - .rebuild_for_schedule
stage: prep
variables:
GIT_STRATEGY: none
extends:
- .fdo.container-build@fedora
- .policy
- - .rebuild_for_schedule
stage: prep
variables:
GIT_STRATEGY: none
extends:
- .fdo.container-build@ubuntu
- .policy
- - .rebuild_for_schedule
stage: prep
variables:
GIT_STRATEGY: none
extends:
- .fdo.container-build@arch
- .policy
- - .rebuild_for_schedule
stage: prep
variables:
GIT_STRATEGY: none
extends:
- .fdo.container-build@alpine
- .policy
- - .rebuild_for_schedule
stage: prep
variables:
GIT_STRATEGY: none
# 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"
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()) %}
extends:
- .fdo.qemu-build@{{distro.name}}
- .policy
- - .rebuild_for_schedule
stage: prep
tags:
- kvm
extends:
- .fdo.container-build@{{distro.name}}
- .policy
- - .rebuild_for_schedule
stage: prep
variables:
GIT_STRATEGY: none
# 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"