Using the BuildDisableRepos configuration, it is now possible to
define which repositories to build-disable in the QA project meta.
This is for example useful for the SLES development workflow, where
the product repository should only be enabled after the packagelist
definitions have been built - so it is not desirable to have them
built as soon as the QA project is created.
Example:
{
"ObsProject": "SUSE:SLFO:Main",
"StagingProject": "SUSE:SLFO:Main:PullRequest",
"QA": [
{
"Name": "SLES",
"Origin": "SUSE:SLFO:Products:SLES:16.1",
"BuildDisableRepos": ["product"]
}
]
}
Signed-off-by: Eugenio Paolantonio <eugenio.paolantonio@suse.com>
OBS Staging Bot
Build a PR against a ProjectGit, if review is requested.
Main Tasks
- A build in OBS is initiated when a review for this bot is requested.
- The overall build status is reported:
- Build successful
- Build failed
- It checks the build status only for the involved packages compared to the last state of the project for all architectures and all flavors.
- It adds an svg with detailed building status.
Target Usage
Any project (devel, etc) that accepts PR and wants build results
Configuration File
Bot reads staging.config from the project git or the PR to the project git.
It's a JSON file with following syntax:
{
"ObsProject": "SUSE:SLFO:1.2",
"StagingProject": "SUSE:SLFO:1.2:PullRequest",
"QA": [
{
"Name": "SLES",
"Origin": "SUSE:SLFO:Products:SLES:16.0",
"BuildDisableRepos": ["product"]
}
]
}
| Field name | Details | Mandatory | Type | Allowed Values | Default |
|---|---|---|---|---|---|
| ObsProject | Product OBS project. Builds in this project will be used to compare to builds based on sources from the PR. | yes | string | [a-zA-Z0-9-_:]+ |
|
| StagingProject | Used both as base project and prefix for all OBS staging projects. Upon being added as a reviewer to a PrjGit PR, this bot automatically generates an OBS project named StagingProject:<PR_Number>. It must be a sub-project of the ObsProject. | yes | string | [a-zA-Z0-9-_:]+ |
|
| QA | Crucial for generating a product build (such as an ISO or FTP tree) that incorporates the packages. | no | array of objects | ||
| QA > Name | Suffix for the QA OBS staging project. The project is named StagingProject:<PR_Number>:Name. | no | string | ||
| QA > Origin | OBS reference project | no | string | ||
| QA > BuildDisableRepos | The names of OBS repositories to build-disable, if any. | no | array of strings | [] |
Details
-
OBS staging projects are deleted when the relative PrjGit PR is closed or merged.
-
PrjGit PR - staging project
- The OBS staging project utilizes an scmsync tag, configured with the
onlybuildflag, to exclusively build packages associated with this specific PrjGit PR. - The build config is inherited from the PrjGit PR config file (even if unchanged).
- The project meta creates a standard repository following the StagingProject as a project path.
- The base StagingProject has the macro FromScratch: set in its config, which prevents inheriting the configuration from the included project paths.
- The bot copies the project maintainers from StagingProject to the specific staging project (StagingProject:<PR_Number>).
- The bot reports “Build successful” only if the build is successful for all repositories and all architectures.
- The OBS staging project utilizes an scmsync tag, configured with the
-
PrjGit PR - QA staging project
- The QA staging project is meant for building the product; the relative build config is inherited from the
QA > Originproject. - In this case, the scmsync tag is inherited from the
QA > Originproject. - It is desirable in some cases to avoid building some specific build service repositories when not needed. In this case,
QA > BuildDisableReposcan be specified. These repositories would be disabled in the project meta when generating the QA project.
- The QA staging project is meant for building the product; the relative build config is inherited from the