Commit Graph

2319 Commits

Author SHA1 Message Date
Hunor Csomortáni
e6640bb95b Use images from Quay to run the tests on CentOS CI
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-06-12 08:31:39 +02:00
Hunor Csomortáni
9b90836595 Document using images from Quay.io for testing
Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-06-12 08:31:39 +02:00
Hunor Csomortáni
7db21b7385 Contributing: replace docker with podman
Recommend using podman instead of docker because:

* one can spin up containers without sudo with podman;
* docker in Fedora has a really old version, and probably will be
  depercated at some point.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-06-11 14:04:30 +02:00
Hunor Csomortáni
71900fb471 Merge #1283 Add a 10 minutes timeout to cloning tests 2019-06-11 11:46:03 +00:00
Hunor Csomortáni
165325fc3e Add a 10 minutes timeout to cloning tests
This stage often gets blocked and takes hours until it gets cancelled.
Add a 10 minutes timeout to make it fail faster.

Signed-off-by: Hunor Csomortáni <csomh@redhat.com>
2019-06-11 12:32:46 +02:00
Igor Gnatenko
cdb701d525 Allow configuring 'dynamic_buildrequires'
The default is not set because we want to use koji's default if modulemd
does not specify 'dynamic_buildrequires'.

Requires: https://pagure.io/koji/pull-request/1466
Closes: https://pagure.io/fm-orchestrator/issue/1264
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-06-09 18:53:04 +02:00
Jan Kaluža
d34118cae4 Merge #1277 Take the list of arches for -build Koji tag from buildrequired modules. 2019-06-07 13:36:48 +00:00
Jan Kaluza
bf0bcaff57 Take the list of arches for -build Koji tag from buildrequired modules.
Currently, we are using just `conf.arches` and `conf.base_module_arches`
to define the list of arches for which the RPMs in a submitted module are
built. This is not enough, because RCM needs to generate modules based
on the base modules which should use different arches.

This commit changes the MBS to take the list of arches from the buildrequired
module build. It checks the buildrequires for "privileged" module or base
module and if it finds such module, it queries the Koji to find out the list
of arches to set for the module.

The "privileged" module is a module which can override base module arches
or disttag. Previously, these modules have been defined by
`allowed_disttag_marking_module_names` config option. In this commit,
this has been renamed to `allowed_privileged_module_names`.

The list of arches are stored per module build in new table represented
by ModuleArch class and are m:n mapped to ModuleBuild.
2019-06-07 13:16:31 +02:00
mprahl
4aeabc0f9b Set the test data in test_submit_build_automatic_z_stream_detection to match the actual use-case 2019-06-04 09:29:37 -04:00
Valerij Maljulin
52a600be40 Make sync_koji_build_tags poller working only with the builds that are in build state for some time
This fixes #1271

Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-05-30 18:01:18 +02:00
Valerij Maljulin
13afde0124 Fix for test_sync_koji_build_tags
Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-05-30 12:53:25 +02:00
Jan Kaluza
222f0417cf Use single session object in greenwave handler and call commit() in the end. 2019-05-29 13:45:08 +02:00
Jan Kaluza
ae2b6d9533 Release 2.21.0 v2.21.0 2019-05-24 10:17:56 +02:00
Valerij Maljulin
87d3a39607 A poller for Greenwave
Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-05-22 13:20:26 +02:00
mprahl
dd5667665d Query the Red Hat Product Pages to see if this is a Z stream build when configured
In certain use-cases, a module's buildrequires may remain the same
in the modulemd, but a different support stream of the buildrequired
base module should be used. For example, since RHEL 8.0.0 is GA, any
modules that buildrequire platform:el8.0.0 should buildrequire
platform:el8.0.0z instead.
2019-05-21 08:55:52 -04:00
mprahl
00ea4e3bca Breakout some of the functionality in _handle_base_module_virtual_stream_br so it can be reused for a future feature 2019-05-21 08:55:52 -04:00
Matt Prahl
79ba221172 Merge #1262 Make pipeline job options consistent 2019-05-21 12:55:45 +00:00
Valerij Maljulin
95bacc4e15 Add greenwave query to done handler
Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-05-17 16:10:06 +02:00
Mike Bonnet
d80316ebf2 Make pipeline job options consistent
Set a consistent set of options on Jenkins pipeline jobs. This includes timestamps,
reasonable timeouts, saving only the last 10 builds (to avoid filling up the disk
of the Jenkins master), disabling concurrent builds (to avoid hitting quota limits),
and skipping the default checkout (all jobs that need the source call checkout()
explicitly).
2019-05-16 12:22:47 -07:00
mprahl
4b5618f079 Add scratch to the short JSON
This is needed for the MBS-UI PR:
https://github.com/release-engineering/mbs-ui/pull/10
2019-05-16 15:44:09 +00:00
mprahl
a8eaac7c0a Build the JSON using Groovy in the failing integration test rather manually creating a JSON string 2019-05-16 09:32:22 -04:00
Matt Prahl
2db62eb897 Merge #1258 Run the integration tests from the current branch 2019-05-16 13:31:44 +00:00
mprahl
c1e2a5b0af Unpin the libmodulemd RPMs 2019-05-16 11:51:38 +00:00
Mike Bonnet
095fab0292 Run the integration tests from the current branch
Previously, the integration test pipeline was configured to always use the tests present on the
master branch. When running the pre-merge pipeline for a PR, this would result in potentially
out-dated tests being run. This change runs the tests from the current branch, allowing the code
and the tests to evolve together.

This also disables the default checkout of the master branch, which is unnecessary when calling
checkout() from the pipeline.
2019-05-15 16:44:29 -07:00
mprahl
dde4b96baf Add an integration test for buildrequiring a virtual stream 2019-05-15 13:47:32 -04:00
mprahl
14d0c30990 Add a try/catch around the grant-cg-access code in the integration tests
Since there's no way of knowing if the user has already been granted access,
this wraps this code and just ignores the failure.
2019-05-15 13:47:32 -04:00
mprahl
85f1228b76 Remove an unnecessary print statement in the tests 2019-05-15 13:47:32 -04:00
mprahl
d208fd479c Cast the version to an integer for proper sorting in get_last_builds_in_stream_version_lte 2019-05-15 13:47:32 -04:00
mprahl
beb38b0fd2 Modify ModuleBuild._add_virtual_streams_filter to use a subquery to better support Postgres
The old way performed a `DISTINCT (module_builds.id)` on the original query passed in
to ModuleBuild._add_virtual_streams_filter, but this caused issues when the original
query was ordered by something other than ID on Postgres databases. This new approach
uses a subquery to filter that module builds with the desired virtual streams, and then
joins this subquery to the original query.
2019-05-15 13:47:32 -04:00
mprahl
84dc82c4a0 Add a migration that adds a missing uniqueness constraint that was defined in the model
The uniqueness constraint was added in 599c881714, but it
was not part of the migration.
2019-05-15 11:14:05 -04:00
mprahl
ea838a9855 Set nullable=False on the ModuleBuild.context column model to match the migration
The context column was added in d83e6897ca. The
migration set `nullable=False`, but the model kept the default of `nullable=True`.
This caused `mbs-manager db migrate` to create a migration for setting the context
collumn to `nullable=True`.
2019-05-15 11:14:05 -04:00
mprahl
8c6822f871 Add the missing modules_allow_scratch entry in config.py 2019-05-14 21:46:28 -04:00
mprahl
40e0e8f062 Provide a better error message when the modulemd version is unsupported
Also raise an exception if `load_mmd` is called with None as an argument.
2019-05-14 10:03:32 -04:00
mprahl
0d96b1ffd3 Pin the RPMs for libmodulemd v2 in the Jenkins job 2019-05-13 22:26:07 -04:00
mprahl
2208021470 Fix the Python 3 unit tests 2019-05-13 13:40:37 -04:00
mprahl
88f8021d94 Add krb5-devel as a dependency in Vagrant to fix the installation of Python dependencies 2019-05-13 13:40:37 -04:00
mprahl
d0f03daf61 Raise a ValidationError when buildonly or buildafter are set
This can be reverted when #1216 is implemented.
2019-05-13 13:40:37 -04:00
mprahl
67ad5dded7 Clean up test_format_mmd 2019-05-13 13:40:37 -04:00
mprahl
14098cea08 Migrate to libmodulemd v2
This also moves the methods load_mmd and load_mmd_file to
module_build_service.utils.general.

This also removes some MSE unit tests with a mix of positive and
negative streams since this is not supported in libmodulemd v2. The
user will be presented with a syntax error if they try to submit
such a modulemd file.
2019-05-13 13:40:37 -04:00
mprahl
e2a75c3323 Release v2.20.0 v2.20.0 2019-05-10 10:23:15 -04:00
mprahl
53ba1513e2 Add a code style guide 2019-05-10 13:02:27 +00:00
mprahl
74be9e8428 Add documentation that defines libsolv terms and how they relate to MBS 2019-05-07 08:56:54 -04:00
mprahl
37e4c718d9 Simplify format_mmd since scm.commit is always set or returns an exception 2019-05-06 15:13:24 +00:00
mprahl
f4dd91e9ec Add an efficiency improvement to SCM.get_full_commit_hash
Basically, if the commit has already been resolved from the branch,
the full commit hash is already cached, so just return that.
2019-05-06 15:13:24 +00:00
mprahl
3a22204255 Clean up a comment in SCM.get_latest 2019-05-06 15:13:24 +00:00
mprahl
c98ac3e4c3 Remove unnecessary getters and setters in the SCM class 2019-05-06 15:13:24 +00:00
mprahl
771fad6d50 Resolve the commit in the SCM.commit property method instead of the constructor
This will prevent the need to call `SCM.get_latest` in the constructor,
since not all SCM objects need the commit to the branch. It also fixes
the situation where a component's git repo doesn't have a "master" branch.

See https://pagure.io/fm-orchestrator/issue/1224
2019-05-06 15:13:24 +00:00
mprahl
02f00d93c1 Add debug log statements so that SCM problems are easier to debug in the future 2019-05-06 15:13:23 +00:00
mprahl
1885a8b11f Improve the readability of SCM.get_latest 2019-05-06 15:13:23 +00:00
mprahl
6187ce4a05 Update the SCM.__init__ docstring 2019-05-06 15:13:23 +00:00