Skip to content

Use OBS built container as CI base to provide all dependencies #142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

okurz
Copy link
Member

@okurz okurz commented Oct 13, 2021

No description provided.

@Martchus
Copy link
Contributor

see comments in #141

@okurz
Copy link
Member Author

okurz commented Oct 13, 2021

I am trying to define a container within git, check that out in OBS, build it there and reuse from there.

Did

osc copypac devel:openQA:ci base devel:openQA:ci openqa-trigger-from-obs

and adapted
https://build.opensuse.org/package/view_file/devel:openQA:ci/openqa-trigger-from-obs/_service?expand=1
but this won't work because we do not have "python3-black" in devel:openQA:ci

So instead I created a new subproject https://build.opensuse.org/project/show/devel:openQA:openqa-trigger-from-obs and moved the package there https://build.opensuse.org/package/show/devel:openQA:openqa-trigger-from-obs/openqa-trigger-from-obs

I copied and adjusted the config for building container images from devel:openQA.

Then I did

osc linkpac openSUSE:Factory python-black devel:openQA:openqa-trigger-from-obs

and python3-black is correctly built but the container does not find it: https://build.opensuse.org/package/show/devel:openQA:openqa-trigger-from-obs/openqa-trigger-from-obs

@okurz okurz marked this pull request as draft October 13, 2021 10:28
@Martchus
Copy link
Contributor

The container has the same problem as the manual zypper in … before. Maybe devel:openQA:Leap:15.3 can be added to the repository paths for building the container.

@okurz
Copy link
Member Author

okurz commented Oct 13, 2021

The container has the same problem as the manual zypper in … before. Maybe devel:openQA:Leap:15.3 can be added to the repository paths for building the container.

well, as an alternative we could try that. But I think a separate subrepo with just the minimum required would be cleaner

@okurz okurz changed the title CI: Switch to Leap 15.3 base due to boo#1190670 Use OBS built container as CI base to provide all dependencies Nov 8, 2021
@okurz
Copy link
Member Author

okurz commented Jul 15, 2025

Updated to use Tumbleweed as base so that we don't need to care to bump the OS version number. Adjusting the OBS service project accordingly

@okurz okurz force-pushed the fix/container branch 4 times, most recently from 60d2a55 to 2980d08 Compare July 15, 2025 12:20
@okurz okurz marked this pull request as ready for review July 15, 2025 12:30
@okurz
Copy link
Member Author

okurz commented Jul 15, 2025

All done. After merge I would setup the github-OBS webhook connection to automatically trigger the dependency container build on every change in this repo

Copy link

@d3flex d3flex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I am wrong and maybe there is another reasoning for python3-importlib-metadata. Would you mind to double check?

#!BuildTag: openqa-trigger-from-obs-dev
#!UseOBSRepositories
FROM opensuse/tumbleweed
RUN zypper -n in --no-recommends diffutils tar make git-core python3-black python3-importlib-metadata
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure you need python3-importlib-metadata because I didnt find any reference in https://github.com/os-autoinst/openqa-trigger-from-obs/blob/master/script/scriptgen.py?
Then I tried local pulling the imageand run the test

Loading repository data...
Reading installed packages...
'make' is already installed.
No update candidate for 'make-4.4.1-3.3.x86_64'. The highest available version is already installed.
'python3-black' not found in package names. Trying capabilities.
Resolving package dependencies...

The following NEW package is going to be installed:
  python313-black

1 new package to install.

Package download size:   446.3 KiB

Package install size change:
              |       2.0 MiB  required by packages that will be installed
     2.0 MiB  |  -      0 B    released by packages that will be removed

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): y
Preloading: python313-black-25.1.0-4.1.noarch.rpm [done]
Preload finished. [success (13.7 KiB/s) ] ..............................................................................................................................................................................................................................[done]
Retrieving: python313-black-25.1.0-4.1.noarch (openSUSE-Tumbleweed-Oss)                                                                                                                                                                                   (1/1), 446.3 KiB    

Checking for file conflicts: ...........................................................................................................................................................................................................................................[done]
(1/1) Installing: python313-black-25.1.0-4.1.noarch ....................................................................................................................................................................................................................[done]
Running post-transaction scripts .......................................................................................................................................................................................................................................[done]
c314f5120a73:/openqa-trigger-from-obs # make test_python_style
black --check --fast --diff script/scriptgen.py 
All done! ✨ 🍰 ✨
1 file would be left unchanged.
c314f5120a73:/openqa-trigger-from-obs # zypper se -i python3-importlib-metadata
Loading repository data...
Reading installed packages...
No matching items found.

@okurz
Copy link
Member Author

okurz commented Jul 18, 2025

Maybe I am wrong and maybe there is another reasoning for python3-importlib-metadata. Would you mind to double check?

Well, you checked already and I checked myself and I also couldn't find a reason why we would need that so removed. Updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants