during HackWeek I improved a bit the Rake tasks we use in YaST, here is a short
summary of the changes.
Added osc:config Task
The packaging configuration might be complex and it might be quite difficult to find
where the package will be submitted with the osc:sr task in the end.
This task prints the summary of the packaging configuration:
Package directory: package
OBS instance: https://api.opensuse.org/
OBS project: devel:languages:ruby:extensions
OBS package name: rubygem-packaging_rake_tasks
OBS build target: openSUSE_Tumbleweed
OBS submit target: openSUSE:Factory
It also honors the YAST_SUBMIT variable:
YAST_SUBMIT=sle15sp1 rake osc:config
Package directory: package
OBS instance: https://api.suse.de/
OBS project: Devel:YaST:SLE-15-SP1
OBS package name: yast2
OBS build target: SUSE_SLE-15-SP1_Update
OBS submit target: SUSE:SLE-15-SP1:Update
Updated check:committed Task
The osc:build or osc:sr tasks check whether all changes have been committed to Git to
avoid missing files and changes. That's good. But if you are testing a fix it is
quite annoying that you have to commit every single change before running a testing
rake osc:build CHECK_MODIFIED=0
Note: We need to keep the check for *new* files because "rake package" archives
the files known to Git, so the package build would miss them later.
Added run:container[client] Task
This is similar to the "run[client]" task, but it runs the client in a Docker
container. Because the Docker container environment is quite limited (no systemd, no
boot loader, no HW access) some modules will not work properly. But it works for some
modules/clients (like "repositories").
It uses the same container as specified in the GitHub Actions, see the
Added GitHub Action Tasks
These tasks allow running the GitHub Actions locally
actions:list - print the defined GitHub Action jobs
actions:details - print the details of the defined GitHub Action jobs
actions:run[job] - run the specified GitHub Action job locally,
if "job" is not specified then it runs all jobs
You can run the same[*] jobs as the GitHub Actions do on the server!
There are several options you can use in the "actions:run" and
KEEP_CONTAINER=1 - keeps the container running after finishing the job/client,
that might be useful for debugging or testing if something fails.
It prints the instructions how to connect to the container and remove it.
Do not forget to remove the container manually at the end otherwise it it will
keep running and consuming some (tiny) system resources!
DOCKER_IMAGE=<image> - it might be useful to use a different Docker image
than the one which is specified in the GitHub Actions. Of course, when using
a different image the result might be different than in real GitHub Actions.
But that might be useful in some cases, see the example below.
rake actions:run[Checks] KEEP_CONTAINER=1
# use the Leap 15.3 based Docker image if the latest TW image with glibc-2.33
# does not work with older Docker in your system
See the details in these pull requests:
[*] The Docker containers use the host kernel and depend on the Docker version
installed. So it is not 100% the same, but very very close...
SUSE LINUX, s.r.o.
18600 Praha 8