Description
Travis provides nice integration with GitHub, it can automatically run tests for every commit or every pull request.
It is already used in e.g. registration module, see the build result.
Unfortunately the current support is quite limited, the problem is that Yast packages are not available at Travis builders. The workaround is to mock used Yast calls (that leads to overmocking) and reimplementing some Yast core functions. Another solution is to test only the functionality which does not rely on Yast much, but that means the code coverage will be rather small...
Provide Yast packages for Ubuntu
Travis allows to install additional packages (see the doc), but the builders are running Ubuntu and we do not have Yast packages for Ubuntu...
The solution is to repackage Yast packages to deb packages for Ubuntu in YaST:Head:Travis OBS project.
Notes
We do not need to package all Yast modules, just the base packages like
yast2-core,yast2,yast2-ruby-bindingsand the dependent packages, the leaf packages do not need to packaged.It's really about repackaging, the Yast packages will very likely not work in Ubuntu out of box (because of different config files, package names, file locations, services, different system defaults, different package management...). But that should not matter as the system access will be stubbed/mocked in the tests anyway, for running tests the real functionality is not needed, we just need that the files can compiled and loaded.
Current Status
I have already started the project at the CSM department workshop last month. What has been done:
YaST:Head:Travis OBS project set up
Some modules already have
.travis.ymlfile added and Travis builds are enabled inTravisbranchThere is the overview of already converted modules is available
The Goal
- Enable Travis builds for all currently maintained Yast packages (in Git master branch)
- As a side effect we could attract some Debian/Ubuntu developers to help us with the Yast port and this could help us to broaden the community around Yast.
The Future
- The support could be enhanced to other Git branches, for example SLE12-GA branch could be used for testing SLE12 maintenace updates.
- The tests run at Travis can be enhanced to report test code coverage using coveralls
Links
- http://docs.travis-ci.com/user/installing-dependencies/
- http://en.opensuse.org/openSUSE:BuildServiceDebian_builds
- https://wiki.debian.org/HowToPackageForDebian
- https://www.debian.org/doc/manuals/maint-guide/dreq.en.html
This project is part of:
Hack Week 11
Activity
Comments
-
about 11 years ago by lslezak | Reply
The Result
I have managed to enable Travis support to all Yast modules, which I consider a big success!
See the details in this document.
This should improve testing automation for all Yast modules and we should be more confident when doing changes in Yast as basically every commit to Git
masterwill be automatically tested.
Similar Projects
GHC-9.14 and split Hadrian from GHC build by osukup
Description
Prepare openSUSE Tumbleweed project for new GHC Haskell compiler and separate builder (Hadrian) from GHC build
Goals
- have GHC-9.14 project with working compiler and if possible filled with packageset
- have Hadrian in own package built with bootstrap compiler to separate Hadrian bootstrap from ghc bootstrap
Resources
opensuse haskell package gen project
Testing and adding GNU/Linux distributions on Uyuni by juliogonzalezgil
Join the Gitter channel! https://gitter.im/uyuni-project/hackweek
Uyuni is a configuration and infrastructure management tool that saves you time and headaches when you have to manage and update tens, hundreds or even thousands of machines. It also manages configuration, can run audits, build image containers, monitor and much more!
Currently there are a few distributions that are completely untested on Uyuni or SUSE Manager (AFAIK) or just not tested since a long time, and could be interesting knowing how hard would be working with them and, if possible, fix whatever is broken.
For newcomers, the easiest distributions are those based on DEB or RPM packages. Distributions with other package formats are doable, but will require adapting the Python and Java code to be able to sync and analyze such packages (and if salt does not support those packages, it will need changes as well). So if you want a distribution with other packages, make sure you are comfortable handling such changes.
No developer experience? No worries! We had non-developers contributors in the past, and we are ready to help as long as you are willing to learn. If you don't want to code at all, you can also help us preparing the documentation after someone else has the initial code ready, or you could also help with testing :-)
The idea is testing Salt and Salt-ssh clients, but NOT traditional clients, which are deprecated.
To consider that a distribution has basic support, we should cover at least (points 3-6 are to be tested for both salt minions and salt ssh minions):
- Reposync (this will require using spacewalk-common-channels and adding channels to the .ini file)
- Onboarding (salt minion from UI, salt minion from bootstrap scritp, and salt-ssh minion) (this will probably require adding OS to the bootstrap repository creator)
- Package management (install, remove, update...)
- Patching
- Applying any basic salt state (including a formula)
- Salt remote commands
- Bonus point: Java part for product identification, and monitoring enablement
- Bonus point: sumaform enablement (https://github.com/uyuni-project/sumaform)
- Bonus point: Documentation (https://github.com/uyuni-project/uyuni-docs)
- Bonus point: testsuite enablement (https://github.com/uyuni-project/uyuni/tree/master/testsuite)
If something is breaking: we can try to fix it, but the main idea is research how supported it is right now. Beyond that it's up to each project member how much to hack :-)
- If you don't have knowledge about some of the steps: ask the team
- If you still don't know what to do: switch to another distribution and keep testing.
This card is for EVERYONE, not just developers. Seriously! We had people from other teams helping that were not developers, and added support for Debian and new SUSE Linux Enterprise and openSUSE Leap versions :-)
Pending
In progress
FUSS
FUSS is a complete GNU/Linux solution (server, client and desktop/standalone) based on Debian for managing an educational network.
https://fuss.bz.it/
Seems to be a Debian 12 derivative, so adding it could be quite easy.
[W]Reposync (this will require using spacewalk-common-channels and adding channels to the .ini file)[W]Onboarding (salt minion from UI, salt minion from bootstrap script, and salt-ssh minion) (this will probably require adding OS to the bootstrap repository creator) --> Working for all 3 options (salt minion UI, salt minion bootstrap script and salt-ssh minion from the UI).[W]Package management (install, remove, update...) --> Installing a new package works, needs to test the rest.[I]Patching (if patch information is available, could require writing some code to parse it, but IIRC we have support for Ubuntu already). No patches detected. Do we support patches for Debian at all?[W]Applying any basic salt state (including a formula)