openSUSE-release-tools/docs/totest.asciidoc

111 lines
3.4 KiB
Plaintext
Raw Normal View History

2014-06-11 10:38:35 +02:00
ToTest Plugin Documentation
===========================
2014-06-10 15:57:14 +02:00
:author: openSUSE Team at SUSE
:toc:
Introduction
------------
[id="intro"]
In the current Factory model,
https://build.opensuse.org/project/show/openSUSE:Factory:ToTest[Factory:ToTest]
2017-01-13 17:36:36 +01:00
represents the project that stores several Factory Snapshots that are
2014-06-10 15:57:14 +02:00
candidates to be released if the measured quality (according to
openQA) is good enough.
2017-01-13 17:36:36 +01:00
This plugin encapsulates several conditions that are needed to decide
2014-06-10 15:57:14 +02:00
if a snapshot can be published or not:
* Check if the overall status of openQA is green.
* Check if all the repositories in openSUSE:Factory can be published.
2017-01-13 17:36:36 +01:00
If Factory meets both criteria, this plugin will publish a new version
of the project openSUSE:Factory:ToTest, if the version is different
2014-06-10 15:57:14 +02:00
from the current Factory.
2020-04-24 10:46:41 +02:00
Setup
2014-06-10 15:57:14 +02:00
------------
2020-04-24 10:46:41 +02:00
[id="cli"]
2014-06-10 15:57:14 +02:00
2020-04-24 10:46:41 +02:00
Create a :ToTest subproject of the project you like to have ttm running. The
user account of the ttm needs to have access, eg.
2014-06-10 15:57:14 +02:00
-------------------------------------------------------------------------------
2020-04-24 10:46:41 +02:00
$ osc meta prj MyProject:ToTest
[...]
<person userid="totest-manager" role="maintainer"/>
[...]
2014-06-10 15:57:14 +02:00
-------------------------------------------------------------------------------
2020-04-24 10:46:41 +02:00
If images or products are meant to be released make sure to set the image type:
2014-06-10 15:57:14 +02:00
-------------------------------------------------------------------------------
2020-04-24 10:46:41 +02:00
$ osc meta prjconf MyProject:ToTest
%if "%_repository" == "images"
%Type: kiwi
%Repotype: staticlinks
%Patterntype: none
%Prefer: openSUSE-release
%endif
2014-06-10 15:57:14 +02:00
-------------------------------------------------------------------------------
2020-04-24 10:46:41 +02:00
In the main project meta, add release targets for the repos that you want to
have released into :ToTest
2014-06-10 15:57:14 +02:00
2020-04-24 10:46:41 +02:00
-------------------------------------------------------------------------------
$ osc meta prj MyProject
[...]
<repository name="images">
<releasetarget project="MyProject:ToTest" repository="images" trigger="manual"/>
[...]
-------------------------------------------------------------------------------
Configure the attribute for ttm so it knows what to release:
-------------------------------------------------------------------------------
$ cat <<EOF > myattribute
jobs_num: 2
openqa_group: My Product 66.6
openqa_server: https://openqa.opensuse.org
product_repo: images
product_arch: x86_64
products:
ftp:
- 000product:MyProduct-ftp-ftp-x86_64
main:
- 000product:MyProduct-dvd5-dvd-x86_64
images:
- MyProduct-Live:
- x86_64
take_source_from_product: true
need_same_build_number: true
set_snapshot_number: true
test_subproject: ToTest
EOF
$ osc meta attribute MyProject -c -a OSRT:ToTestManagerConfig -F myattribute
-------------------------------------------------------------------------------
Create a 00Meta package in the main project for ttm to store some metadata:
2014-06-10 15:57:14 +02:00
2020-04-24 10:46:41 +02:00
-------------------------------------------------------------------------------
$ osc meta pkg -e MyProject/00Meta
[...]
<person userid="totest-manager" role="maintainer"/>
[...]
-------------------------------------------------------------------------------
Force release initially
-------------------------------------------------------------------------------
./totest-manager.py release --force MyProject
-------------------------------------------------------------------------------
After that run
-------------------------------------------------------------------------------
./totest-manager.py run MyProject
-------------------------------------------------------------------------------