Skip to content

Commit

Permalink
Merge pull request #5 from davidcassany/add_unstable_channel
Browse files Browse the repository at this point in the history
Add unstable channel
  • Loading branch information
davidcassany authored Jun 25, 2024
2 parents 5a2ed0d + 9ed8cd4 commit 3c9e9ef
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 1 deletion.
1 change: 1 addition & 0 deletions .obs/dockerfile/Dockerfile.sle-micro-5-5
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions .obs/dockerfile/Dockerfile.sle-micro-5-5-kvm
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions .obs/dockerfile/Dockerfile.sle-micro-5-5-rt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
43 changes: 43 additions & 0 deletions .obs/dockerfile/Dockerfile.unstable
Original file line number Diff line number Diff line change
@@ -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"]
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
29 changes: 29 additions & 0 deletions channels/unstable.json
Original file line number Diff line number Diff line change
@@ -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)"
}
}
}
]

0 comments on commit 3c9e9ef

Please sign in to comment.