'koji_arches' was renamed to 'arches' in a previous commit. Update the
configuration in the OpenShift template accordingly.
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
The backend container images needs a build argument holding the UMB CA
certificate. Update the README with this information.
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
The template is intended to be used for testing, so it makes sense to
allow submitting builds from custom SCM URLs.
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
In testing contexts there auth providers are still missing. Disable auth
to allow anyone to submit module builds.
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
The value referenced by variable dependencies is a list of koji_tags.
So, it would be more straightforward to use an alternative name like
dep_koji_tags than dependencies which is too general.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Both tag and dependencies are set directly by calling private method
_get_deps_and_tag. There is no need to set initial value for them
separately.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
rhpkg could be installed inside Vagrant machine to run MBS with internal
infra. rhpkg installs config file into /etc/module-build-service, which
could fail with following error if /etc/module-build-service is a link
to /opt/module_build_service/conf.
error: unpacking of archive failed on file
/etc/module-build-service/redhat.py;5be25ac4: cpio: chown
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
git-ls-remote accepts paramter refs to just return refs for specific
ones. This refactor uses this parameter to avoid handling full list of
refs from remote repository.
In original code, option --exit-code is passed to git-ls-remote, which
would cause command return exit code 2 when no ref is found from remote
repository. SCM._run raises an error if that happens, but the raised
error is not handled. This refactor catches this error to ensure the
original behavior happens, that is if a ref is not found, treat it as a
commit hash and call SCM.get_full_commit_hash.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
For an explanation of transitive stream collision, please refer to the
source code docstring.
When such collision is detected, error is raised with proper error
message.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Major change is to create a dedicated Python virtual environment for MBS
instead of installing required packages (listed in requirements) into
system site-packages directory.
This would be convenient for developer to install other Python packages
via package manager, for example to install rhpkg. I found an issue when
I installed rhpkg in original Vagrant machine, that is whole kobo
package is installed via pip, and `dnf install rhpkg' will result in
python2-kobo is installed and then it fails to import module
kobo.rpmlib. The fix is I have to install python2-kobo-rpmlib via dnf
again. With this change, this issue could be avoided. Two environments
are separated rather than mixed together.
Another two minor improvements base on this change are, after logging
into the machine, 1) the virtual environment is activated automatically,
and 2) change working directory to /opt/module_build_service.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
Add Dockerfiles to build images for the backend and frontend.
Add an OpenShift template to deploy an MBS test instance, and connect it
to a message bus and Koji instance.
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
For some modules, modularity-wg wants to be able to ship the "-devel" modules containing
the RPMs which are normally filtered out from the module.
This PR generates second Koji CG module with -devel suffix in a name with final modulemd
files containing the filtered out RPMs.
This will allow for tooling to automatically override certain buildrequires and requires
based on the branch name the modulemd is built form.
Addresses FACTORY-3414
Imagine we have "platform:f29.0.0" and "platform:f29.1.0" base modules.
We also have "DBI" module we want to build agaisnt "platform:f29.1.0".
This "DBI" module depends on "perl" module which is only build against
"platform:f29.0.0".
Currently, DBI build would fail to resolve the dependencies, because
it wouldn't find "perl" module, because it is built against different
platform stream.
This PR changes the MSE code to include buildrequired module builds built
against all the compatible platform streams.
It does so by introducing following changes:
- MSE code uses new get_base_module_mmds() method to find out all the
compatible platform modules. This needed new methods in DBResolver
and MBSResolver.
- For each buildrequired module defined by name:stream, the MSE code then
finds particular NSVC built against each compatible platform module.
Side effect of these code changes is that every module now must buildrequire
some base module.
The test tests installation of multiple streams of single module.
For example:
- "app:1" requires "foo:1" and "gtk:1".
- "foo:1" requires "bar:1".
- "gtk:1" requires "bar:2".
"bar:1" and "bar:2" cannot be installed in the same time and therefore
there need to be conflict defined between them.
submit_module_build creates new module build and set parameter url to
ModuleBuild.scmurl. It looks scm.url could be passed to scmurl as well,
but scm is not used through out whole method. url is enough for the
purpose, hence scm is removed.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>