This allows building straight from source, without generating patches and
modifying the specfile manually.
The script will replace the current tarball with the one generated from the
git hash in the source repository. It will also increment the release tag
(following the rules for --test-build), with the commit hash used as a unique
reference.
Note that the new tarball might conflict with the patches generated on top
of the current tarball, or require new dependencies etc., so this is not a
catch-all solution, just a usability improvement for some simpler cases.
Like --pre-build or --test-build, the subcommand takes an additional
argument - the hash of the commit in source repository to generate the
tarball from. It can be called from rpms-xsconsole like this, for example:
koji_build.py --source-build 6f7d91f8 v8.3-u-asultanov2 .
I've specified two automatic spec->source mappings for xapi and
xsconsole in this commit, this can be expanded in the future.
For other repositories, --source-repo has to be specified manually:
koji_build.py --source-build 4e0cae33f7 --source-repo xapi-project/varstored v8.3-u-asultanov2 .
Signed-off-by: Andrii Sultanov <andriy.sultanov@vates.tech>
Some packages don't include the .xcpng8.3 at the end.
This is adjusting the regex used to match with or without that suffix.
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Now remotes of the shape github.com:user/repo are successfully converted
to koji urls. Previously this was only done if it was prepended by git@
Signed-off-by: Pau Ruiz Safont <pau.safont@vates.tech>
Prepares the switch to a future "8.3" branch in each rpms repo by
allowing it in addition to "master" for a transitional period.
Fix redefined-builtin mistake on hash (BTW I noticed similar mistakes
elsewhere to be fixed in later PR that pylint the script)
More checks and logs provided to help user
Relate-to: https://github.com/xcp-ng/xcp/pull/774#discussion_r2564325461
Co-authored-by: Yann Dirson <yann.dirson@vates.tech>
Signed-off-by: Philippe Coval <philippe.coval@vates.tech>
Some scripts were commited in two repos, I removed them from this
one to have only one repo being single souce of thruth which is
an internal repo.
Signed-off-by: Nathanaël HANNEBERT <nathanael.hannebert@vates.tech>
This is to prevent koji_build to write to the repository while it wouldn't
need to for a standard build.
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
Add `--wait-repo` to `koji build` so that it starts the task with a
waitrepo subtask which ensures that the internal repository for the
build tag is up to date.
Signed-off-by: Samuel Verschelde <stormi-xcp@ylix.fr>
Following the upgrade of the koji server, we can at last convert the
scripts to python 3.
Some scripts not re-enabled yet on the server might need to be ported
too.
Signed-off-by: Samuel Verschelde <stormi-xcp@ylix.fr>
Ensures that packages for protected targets (e.g., v8.3-incoming from
master, v8.2-incoming from 8.2) are built directly from the latest
commit of their respective target branch.
This prevent from building a package from sources that may not be in
the intended branch.
This prevents another common issue where a PR is merged into the target
branch but the build uses the PR branch's commit. Such builds omit the
merge commit, leading to the PR appearing in subsequent build reports
despite being effectively integrated.
A --force option is added to bypass these checks, for the few cases
for which it is valid to not build the last commit of the intended
branch.
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
before asking koji to pull a commit it may not be able to retrieve.
The check is only done when not using a pre/test build commit. In that
case we are already assured that the commit is on the remote repository.
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
koji needs a branch that point to our commit to be able to fetch it, so we keep
the branches for 3 hours and remove the old branches when a new test run is run
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
we'll need it later to safely recover from failures and to work with
multiple git command calls
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>