action #129958
closed
coordination #127031: [saga][epic] openQA for SUSE customers
coordination #80150: [epic] Scale out openQA: Easier openQA setup
Ensure openSUSE container best practices are followed for our container images in devel: openQA size:M
Added by okurz over 1 year ago.
Updated over 1 year ago.
Category:
Feature requests
Description
Motivation¶
We have some containers in devel: openQA but they don't follow a clear standard. We should follow openSUSE best practices for containers
Acceptance criteria¶
- AC1: current openSUSE container best practices are known
- AC2: all container images in devel: openQA follow the tumbleweed container template definitions
- A|C3 no build warnings show up in OBS container builds (if possible)
Suggestions¶
- Copied from action #129883: all-in-one openQA container solution added
- Description updated (diff)
all openSUSE containers packages have naming scheme name-container
or name-image
if is used kiwi
Template:
# Specify the license of the container build description (see also the LICENSE file)
# SPDX-License-Identifier: MIT
# Define the names/tags of the container
#!BuildTag: opensuse/example:latest opensuse/example:%PKG_VERSION% opensuse/example:%PKG_VERSION%.%RELEASE%
FROM opensuse/tumbleweed
# Define labels according to https://en.opensuse.org/Building_derived_containers
# labelprefix=org.opensuse.example
LABEL org.opencontainers.image.title="Example container"
LABEL org.opencontainers.image.description="This contains nano %PKG_VERSION%"
LABEL org.opencontainers.image.version="%PKG_VERSION%.%RELEASE%"
LABEL org.opensuse.reference="registry.opensuse.org/opensuse/example:%PKG_VERSION%.%RELEASE%"
LABEL org.openbuildservice.disturl="%DISTURL%"
LABEL org.opencontainers.image.created="%BUILDTIME%"
# endlabelprefix
# Fill the image with content and clean the cache(s)
RUN zypper --non-interactive in nano && zypper clean -a
Service:
<services>
<service mode="buildtime" name="kiwi_metainfo_helper"/>
<service mode="buildtime" name="replace_using_package_version">
<param name="file">Dockerfile</param>
<param name="regex">%PKG_VERSION%</param>
<param name="parse-version">patch</param>
<!-- Fill with the main package of the container.
It determines the version of the container image. -->
<param name="package">nano</param>
</service>
<service mode="buildtime" name="docker_label_helper"/>
</services>
- Subject changed from Ensure openSUSE container best practices are followed for our container images in devel: openQA to Ensure openSUSE container best practices are followed for our container images in devel: openQA size:M
- Description updated (diff)
- Status changed from New to Workable
- Description updated (diff)
- Status changed from Workable to In Progress
- Assignee set to jbaier_cz
- Due date set to 2023-07-08
Setting due date based on mean cycle time of SUSE QE Tools
As mentioned in the pull request, at this point we are breaking AC3 with:
Warning: Using manually defined repositories (https://download.opensuse.org/repositories/devel:/openQA/openSUSE_Tumbleweed, obsrepositories:/) in the image. Only obsrepositories:/ is allowed.
As I would like to keep the Dockerfile buildable without OBS keep the full repo URLs
okurz wrote:
As I would like to keep the Dockerfile buildable without OBS keep the full repo URLs
I did for the very same reason. If needed in the future (for submitting images into official non-devel repository), we can solve the issue by creating another set of images or maybe the need for external repo will be already solved.
The _service file was not yet updated to provide that variable. I fixed that so the image should be build again in a while.
- Status changed from In Progress to Resolved
Most of the recommendations were implemented (where it made sense). I did not change the name of the containers (nor the packages) to prevent failures as we already use it on multiple places. In the current state, those containers cannot be submitted anyway (we are not using obsrepositories:/
), we can rename / create new compatible container packages in the future. All Leap based containers were updated to 15.5 in the process.
- Due date deleted (
2023-07-08)
- Copied to action #138440: devel:openQA container files follow cha.obs.supported_formats#id-1.5.10.8.5 and set BuildVersion+BuildName consistently size:S added
Also available in: Atom
PDF