diff --git a/.obs/dockerfile/Dockerfile.sle-micro-5-5 b/.obs/dockerfile/Dockerfile.sle-micro-5-5 index 576a6f7..d1646ad 100644 --- a/.obs/dockerfile/Dockerfile.sle-micro-5-5 +++ b/.obs/dockerfile/Dockerfile.sle-micro-5-5 @@ -1,5 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 #!BuildTag: rancher/elemental-channel/sle-micro:5.5 +#!BuildTag: rancher/elemental-channel/sle-micro:5.5-%RELEASE% #!UseOBSRepositories ARG SLMICRO_VERSION diff --git a/.obs/dockerfile/Dockerfile.sle-micro-5-5-kvm b/.obs/dockerfile/Dockerfile.sle-micro-5-5-kvm index 78d80a3..3c32ad4 100644 --- a/.obs/dockerfile/Dockerfile.sle-micro-5-5-kvm +++ b/.obs/dockerfile/Dockerfile.sle-micro-5-5-kvm @@ -1,5 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 #!BuildTag: rancher/elemental-channel/sle-micro:5.5-kvm +#!BuildTag: rancher/elemental-channel/sle-micro:5.5-kvm-%RELEASE% #!UseOBSRepositories ARG SLMICRO_VERSION diff --git a/.obs/dockerfile/Dockerfile.sle-micro-5-5-rt b/.obs/dockerfile/Dockerfile.sle-micro-5-5-rt index 7682978..34265bb 100644 --- a/.obs/dockerfile/Dockerfile.sle-micro-5-5-rt +++ b/.obs/dockerfile/Dockerfile.sle-micro-5-5-rt @@ -1,5 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 #!BuildTag: rancher/elemental-channel/sle-micro:5.5-rt +#!BuildTag: rancher/elemental-channel/sle-micro:5.5-rt-%RELEASE% #!UseOBSRepositories ARG SLMICRO_VERSION diff --git a/.obs/dockerfile/Dockerfile.unstable b/.obs/dockerfile/Dockerfile.unstable new file mode 100644 index 0000000..71c432d --- /dev/null +++ b/.obs/dockerfile/Dockerfile.unstable @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: Apache-2.0 +#!BuildTag: rancher/elemental-unstable-channel:latest +#!UseOBSRepositories + +ARG SLMICRO_VERSION + +FROM suse/sl-micro/${SLMICRO_VERSION}/baremetal-os-container:latest AS os + +ADD channel.json /channel.json + +# Align the channel with the latest OS version in the project +RUN source /etc/os-release && \ + IMG_TAG=${IMAGE_TAG%%-*} && \ + sed -i -e "s|%IMG_TAG%|${IMG_TAG}|g" /channel.json + +# Prepare a busybox base +RUN mkdir -p /busybox && rpm --initdb --root /busybox +RUN zypper --installroot /busybox in --no-recommends -y busybox + +FROM scratch +COPY --from=os /busybox / +COPY --from=os /channel.json /channel.json + +ARG BUILD_REPO=%%IMG_REPO%% +ARG IMAGE_REPO=$BUILD_REPO/rancher/elemental-channel:unstable + +# Define labels according to https://en.opensuse.org/Building_derived_containers +# labelprefix=com.rancher.elemental +LABEL org.opencontainers.image.title="Rancher Elemental Unstable Channel" +LABEL org.opencontainers.image.description="Includes the Elemental Channel" +LABEL org.opencontainers.image.version="unstable" +LABEL org.opencontainers.image.url="https://build.opensuse.org" +LABEL org.opencontainers.image.created="%BUILDTIME%" +LABEL org.opencontainers.image.vendor="SUSE LLC" +LABEL org.opensuse.reference=$IMAGE_REPO +LABEL org.openbuildservice.disturl="%DISTURL%" +LABEL com.suse.supportlevel="beta" +# endlabelprefix + +USER 10010:10010 + +ENTRYPOINT ["/usr/bin/busybox", "cp"] +CMD ["/channel.json", "/data/output"] diff --git a/README.md b/README.md index 8395581..a622f83 100644 --- a/README.md +++ b/README.md @@ -38,4 +38,10 @@ It is possible, at any moment, to run the `.refresh_channels.sh` script and inte A GitHub [workflow](.github/workflows/refresh-channels.yaml) does it automatically every night, and optionally it can be triggered at any time. Manually crated `.json` files can be directly created and maintained in the `./channels` directory, for example to maintain a channel containing arbitrary images, for development or testing. -When this is the case, be mindful of not creating collision with the automated [config.yaml](./config.yaml), otherwise files with the same name will be overwritten. +When this is the case, be mindful of not creating collision with the automated [config.yaml](./config.yaml), otherwise files with the same name will be overwritten. + +## Unstable channel + +The `unstable` or `development` channel is a special static one that is meant to include latest build of the development OBS projects. Hence this is an static JSON only +including the ISO and OS container for the current build in projects under or branched from `isv:Rancher:Elemental` in OBS. This channel is not automated or generated by +any kind of continuous integration. diff --git a/channels/unstable.json b/channels/unstable.json new file mode 100644 index 0000000..4064ab9 --- /dev/null +++ b/channels/unstable.json @@ -0,0 +1,29 @@ +[ + { + "metadata": { + "name": "v%IMG_TAG%-os-unstable" + }, + "spec": { + "version": "v%IMG_TAG%", + "type": "container", + "metadata": { + "upgradeImage": "%%IMG_REPO%%/suse/sl-micro/%%SLMICRO_VERSION%%/baremetal-os-container:%IMG_TAG%", + "displayName": "SUSE Linux %%SLMICRO_VERSION%% OS (unstable)" + } + } + }, + { + "metadata": { + "name": "v%IMG_TAG%-iso-unstable" + }, + "spec": { + "version": "v%IMG_TAG%", + "type": "iso", + "metadata": { + "uri": "%%IMG_REPO%%/suse/sl-micro/%%SLMICRO_VERSION%%/baremetal-iso-image:%IMG_TAG%", + "displayName": "SUSE Linux %%SLMICRO_VERSION%% ISO (unstable)" + } + } + } +] +