Commit Graph

2304 Commits

Author SHA1 Message Date
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
mprahl
b75c3dd76e Remove SCM.is_available since it's not used 2019-05-06 15:13:23 +00:00
mprahl
3c4faf0cc0 Remove checking if the commit is set in SCM.checkout since it's always required 2019-05-06 15:13:23 +00:00
Mike Bonnet
ee2ef77fe9 Fix grep to handle the new quoting style introduced in 66c3f821 2019-04-30 21:46:16 -07:00
Mike Bonnet
48778ba545 Grammar fixes 2019-04-30 15:27:28 -07:00
Mike Bonnet
5fffcfedd6 Remove unnecessary comment 2019-04-30 15:27:28 -07:00
Mike Bonnet
21a6f80e1a Split up long lines in openshift/integration/koji/README.md
Also a small typo.
2019-04-30 15:27:28 -07:00
Mike Bonnet
5594d7e2a4 Explain what run-httpd is doing 2019-04-30 15:27:28 -07:00
Mike Bonnet
2c4298e678 read the DigiCert CA cert from a file rather than hard-coding it in the Jenkinsfile 2019-04-30 15:27:28 -07:00
Mike Bonnet
c369bc416c use CMD instead of ENTRYPOINT 2019-04-30 15:27:28 -07:00
Mike Bonnet
9c3d9bb441 MBS-Koji integration tests
This change introduces a set of Jenkins pipelines for building MBS
images and running integration tests against Koji using those images.
These pipelines are directly based on the WaiverDB pipeline work:

https://pagure.io/waiverdb/blob/master/f/openshift

The results of those tests are used to provide feedback to Pagure PRs
and to promote images through a series of environments, which may be
used to implement a continuous deployment process.

The current test cases, written in Groovy, are:
 - module-build-init: initate a module build and check that tags
   and targets in Koji are created correctly
 - module-build-cgimport: build an empty module and ensure that
   results are imported correctly into Koji, using the CGImport
   interface
2019-04-30 15:27:28 -07:00
Brian Stinson
1e423826c6 CI: add some debug options so we can see what git is doing 2019-04-30 16:22:57 -05:00
Jan Kaluza
c5d000e900 Do not overwrite stream kwarg in build_module_locally.
When `default_streams` is set, the current code overwrites `stream`
kwarg in the `for` loop handling the `default_streams`.

In this commit, the `stream` kwarg is not overwritten.
2019-04-30 08:42:59 +02:00
Valerij Maljulin
1b486b1625 Greenwave query class and configuration update
Signed-off-by: Valerij Maljulin <vmaljuli@redhat.com>
2019-04-29 18:15:23 +02:00
Jan Kaluža
7a39e1e893 Merge #1238 Make the code formatting in mbs-cli consistent with the rest of the codebase 2019-04-29 05:40:37 +00:00
Jan Kaluža
f4553dd3c2 Merge #1237 [v2] Fix -debuginfo/-debugsource packages handling in KojiContentGenerator. 2019-04-26 13:24:36 +00:00