81 Commits

Author SHA1 Message Date
Owen W. Taylor
b6c11f83d8 Improve handling of configuration file
* Allow MBS_CONFIG_FILE="" to entirely suppress loading any configuration
   file (useful for running tests and avoiding loading a system-wide
   configuration file.)
 * When loading the configuration file:
   * If the default configuration file path doesn't exist, silently fall back
     to the default configuration
   * For any other OSError, print the exact error
   * Let any other exception throw through, to allow people to debug their
     configuration file
2023-01-23 18:39:25 -05:00
Mike McLean
033acf9b38 clarify id in readme
Fixes https://pagure.io/fm-orchestrator/issue/1723
2021-10-20 13:27:49 -04:00
Jan Kaluza
bfd9a13205 Allow overriding RPM components refs while submitting the module build.
There is a need to rebuild the module builds done in CentOS 9 Stream
internally in MBS to include them in RHEL. This is currenly a hard task,
because the RPM components included in a module are usually
taken from HEAD of the branch defined by their `ref` value.

For the rebuild task, it means we would have to ensure that the HEAD
of all RPM components points to right commit hash right before we start
rebuilding CentOS 9 Stream module in internal MBS. This is very hard
and fragile thing to do, especially if there are two different modules
using the RPM component from the same branch. This is prone to race
condition and makes the rebuilds quite complex and in some cases
not possible to do without force pushes to RPM component repositories
which is not acceptable by internal dist-git policy.

This commit fixes it by allowing overriding the commit hash while
submitting the module build. This helps in the mentioned situation,
because we can keep internal RPM components branches in 1:1 sync with
CentOS 9 Stream branches and HEAD can always point to the same commit
in both internal and CentOS 9 Stream repositories.

When the module rebuild is submitted in internal MBS,
we can use this new feature to override the `ref` for each RPM component
so it points to particular commit and the requirement for HEAD to point
to this commit is no longer there.

The `ref` is overriden only internally in MBS (but it is recorded in logs
and in XMD section), so the input modulemd file is not altered. This is
the same logic as used for other overrides (`buildrequire_overrides` or
`side_tag`).

This does not bring any security problem, because it is already possible
to use commit hash in `ref`, so the package maintainer can already change
the commit hash to any particular commit by using this `ref` value.

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
2021-07-28 08:48:12 +02:00
Brendan Reilly
9f31bf0741 Added link to docs folder in README 2021-05-25 14:36:40 -04:00
Mike McLean
95a6ff9efe remove problematic license link 2021-05-19 15:18:51 -04:00
Mike McLean
9c738500e3 drop internal section links 2021-05-19 15:18:51 -04:00
Mike McLean
086ce8d4f0 remove duplicate substitution 2021-05-19 15:18:34 -04:00
Mike McLean
6a64a5933f docs updates 2021-03-10 12:55:09 -05:00
Merlin Mathesius
790b08ddaa Fix typo in README file that befouls formatting of the option list
Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2020-05-12 16:25:32 -05:00
Merlin Mathesius
da51bebcd9 New 'module_stream' optional parameter
- Implement new optional parameter module_stream to allow a scratch module
  build's stream name to be set from the command line when also submitting a
  YAML modulemd file.
- Validate that module_name and module_stream parameters can only be specified
  along with a YAML modulemd file.
- Add tests to verify that module_stream sets the stream name correctly.
- Add tests to verify that module_name and module_stream are only allowed along
  with a YAML modulemd file.

Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2020-03-10 14:08:29 +00:00
mprahl
9ddb35b8d3 Move models.py to common/models.py and views.py to web/views.py 2020-03-03 14:48:47 -05:00
mprahl
8dc20c1731 Remove unused Kerberos configuration options
This is some leftover code that was missed in 9fd3731ff7.
2019-11-05 15:08:27 -05:00
mprahl
1bcb40d4d0 Allow specifying a specific module build to reuse components from
This resolves #1296.
2019-07-16 11:40:59 +00:00
mprahl
6c4d6ee2b4 Alphabetize the build parameters in the documentation 2019-07-16 11:40:59 +00:00
mprahl
35eb016fd8 Move the Rebuild Strategies documentation to a separate file 2019-06-24 14:29:58 -04:00
mprahl
53ba1513e2 Add a code style guide 2019-05-10 13:02:27 +00:00
mprahl
d0aea40788 Support the stream_version_lte filter in the API 2019-04-25 08:12:49 -04:00
mprahl
0217496d1f Refactor the API ordering to accept multiple order keyword arguments of the same direction
This also improves how a column is determined to be valid for ordering.
2019-04-23 08:37:12 -04:00
Merlin Mathesius
7b7b07211e Add/improve documentation for scratch module build requests,
particularly for the new 'modulemd' and 'module_name' parameters.

Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2019-03-19 11:56:47 +00:00
mprahl
64053e7fed Document virtual platforms 2019-03-19 11:40:20 +00:00
Chenxiong Qi
ea56685667 Fix config name MODULES_ALLOW_SCRATCH in docs
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2019-03-06 14:38:37 +08:00
Merlin Mathesius
f2e7a8db07 Add web request options 'scratch' and 'srpms' for module scratch builds.
Signed-off-by: Merlin Mathesius <mmathesi@redhat.com>
2019-03-01 10:27:04 -06:00
mprahl
486d644d68 Update the module submission API documentation 2019-02-12 15:55:01 -05:00
mprahl
9f9a025958 Use the https protocol to clone dist-git repos instead of the git protocol
You can read about this at:
https://fedoraproject.org/wiki/Infrastructure/HTTPS-commits

The bug was reported at:
https://bugzilla.redhat.com/show_bug.cgi?id=1666257
2019-01-16 19:00:25 +00:00
Chenxiong Qi
2febab9c19 Fix rebuild strategy name changed-and-after in README
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
2018-11-28 22:10:33 +08:00
mprahl
f7e7765686 Add the ability to override buildrequires and requires when submitting a module build
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
2018-10-29 17:08:27 -04:00
mprahl
599c881714 Add the ability to query by the base modules a module build buildrequires
Future use cases will require the ability to find compatible module builds
to buildrequire based on the base module the module used to build. This
commit adds an association table that will contain module build IDs
and the base module they buildrequire.

Addresses FACTORY-3353
2018-10-17 07:47:31 -04:00
Filip Valder
598347e1b6 Import module API 2018-09-07 17:12:01 +02:00
mprahl
8a54b26fd7 Expose the NVR of component builds in the API to help future debugging 2018-08-07 10:33:14 -04:00
mprahl
36a9026ca8 Remove references to COPR 2018-06-28 10:00:06 -04:00
Filip Valder
23a9eb8e70 Add param to README + other minor fixes 2018-06-18 10:01:40 +02:00
Filip Valder
f1fc7ed467 New: Support querying of modules/components with multiple state value filtering 2018-06-13 09:42:38 +02:00
mprahl
a4903876f2 Remove deprecated mbs-build tool 2018-04-03 10:09:29 -04:00
mprahl
601cd64a2a Add a change log 2018-01-22 10:51:22 -05:00
mprahl
53dc444214 Allow filtering on all table columns 2017-11-27 15:08:58 -05:00
mprahl
ea0d03b24c Add documentation on the rebuild strategies 2017-11-13 10:49:37 -05:00
mprahl
9aab9f256b Fix missing parameters in POST example in the documentation 2017-11-13 10:47:28 -05:00
Nick Coghlan
d159350fff Default to reverse ordering by ID in APIs
Adjusts the affected tests to assume the
exact current set of default test data.

These tests were also testing the exact
same query URL, so they've been consolidated
into a single test.
2017-10-31 09:15:08 -04:00
mprahl
eedf0a1684 Default verbose to false but present a lot more information when verbose is false 2017-10-23 20:19:51 -04:00
mprahl
25b689ef46 Update the documentation 2017-10-06 09:58:34 -04:00
mprahl
6165fd5088 Add an API that exposes information about the MBS server 2017-09-19 16:48:28 -04:00
mprahl
0f6d7a55c5 Add Kerberos + LDAP authentication support 2017-09-15 12:02:57 -04:00
Filip Valder
3cb41aa5dc Changes in MBS restful API:
- Refactor MBS API code
- Unify module-/component_build API philosophy/design/approach
- Naming fixes
- _utc_datetime_to_iso moved from ModuleBuildAPI and is now a module-level function.
- Existing v1 API remains unchanged. ComponentBuildAPI now supports individual component build listing + verbose mode.
- documented in README
- various component_build API tests added
2017-09-11 14:48:22 +02:00
Filip Valder
5b7be25558 Add 'Listing component builds' subsection to the API section 2017-08-25 15:01:17 +02:00
Filip Valder
2e2856169a Update and reformat README, CONTRIBUTING guide and sync code comments 2017-08-25 14:45:42 +02:00
Stanislav Ochotnicky
5eb4c1652f Modify content generator based on Koji dev feedback
- Change the type of build from modulemd to just module
- Change build output type from modulemd to file
- Provide the typeinfo also for the modulemd.yaml output
- Convert dashes to underscores for build version (i.e. mbs stream).
  koji build versions can't have dashes - we can provide real value in
  the extra section
- Add name, stream, version data into build extra section
- Add tool information for modulemd
- Add buildroot components from host running mbs
- Added few methods licensed under BSD 3-clause (from atomic-reactor)
2017-05-15 10:39:01 +02:00
Ralph Bean
1104a3ae10 Update README with new tasks API format. 2017-03-05 23:57:51 -05:00
Filip Valder
13b7bcd03e Support for state tracing of modules and components
- DB migration scripts.
- Models: ComponentBuildTrace, ModuleBuildTrace.
- ModuleBuild.state_trace method for querying for a particular module's
state history.
- SQLAlchemy before commit session event handler for recording
module/component state changes.
- REST API verbose mode for getting state trace of a particular module.
- Tests use make_session, so that event handlers are in effect.
- Short info in README about verbose mode.
- Tests verifying whether state trace information about a module appears
in verbose mode.
- Other minor fixes (RidaBase -> MBSBase, PEP8...)
2017-02-28 16:15:43 +01:00
Jakub Kadlčík
6b598b1bf7 Describe yaml file submission 2017-02-21 10:41:31 +01:00
Ralph Bean
74d0398e2e Merge #299 Re-format and update README 2017-01-31 17:27:50 +00:00