action #129958
closedcoordination #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
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¶
- Look up the template in OBS that defines rules to follow. template, docs
- Follow the example of https://build.opensuse.org/package/show/openSUSE:Factory/openQA-devel-container
- Fix container packages
- Optionally submit to Fctry over devel:openQA:tested
- Ensure container packages are rebuilt on deps changes, package changes, Dockerfile changes
- Mention our images in documentation
- Ensure builds fail if there are warnings (if possible), see https://build.opensuse.org/package/live_build_log/devel:openQA/openQA_container_client/containers/x86_64
Updated by okurz over 1 year ago
- Copied from action #129883: all-in-one openQA container solution added
Updated by osukup over 1 year ago
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>
Updated by livdywan over 1 year ago
- 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
Updated by jbaier_cz over 1 year ago
- Status changed from Workable to In Progress
- Assignee set to jbaier_cz
Updated by openqa_review over 1 year ago
- Due date set to 2023-07-08
Setting due date based on mean cycle time of SUSE QE Tools
Updated by jbaier_cz over 1 year ago
For openQA repo: https://github.com/os-autoinst/openQA/pull/5222
Updated by jbaier_cz over 1 year ago
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.
Updated by okurz over 1 year ago
As I would like to keep the Dockerfile buildable without OBS keep the full repo URLs
Updated by jbaier_cz over 1 year ago
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.
Updated by jbaier_cz over 1 year ago
I added similar PR for os-autoinst based containers: https://github.com/os-autoinst/os-autoinst/pull/2335
Updated by okurz over 1 year ago
https://build.opensuse.org/package/live_build_log/devel:openQA/os-autoinst_dev/containers/x86_64 shows
[ 20s] Building image os-autoinst_dev:latest opensuse/os-autoinst-dev:latest opensuse/os-autoinst-dev:%PKG_VERSION% opensuse/os-autoinst-dev:%PKG_VERSION%.%RELEASE%
[ 20s] Unsharing environment
[ 20s] Error: tag opensuse/os-autoinst-dev:%PKG_VERSION%: invalid reference format
[ 20s] podman build command failed
Updated by jbaier_cz over 1 year ago
The _service file was not yet updated to provide that variable. I fixed that so the image should be build again in a while.
Updated by jbaier_cz over 1 year ago
- 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.
Updated by okurz about 1 year ago
- 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