-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from davidcassany/add_unstable_channel
Add unstable channel
- Loading branch information
Showing
6 changed files
with
82 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)" | ||
} | ||
} | ||
} | ||
] | ||
|