Kiril Nesenko, Infrastructure Maintainer at oVirt
David Caro, Software Enigneer at Red Hat
* prepare the diagram related to "Speaker notes"
* prepare a diagram
* show the publisher screenshot
oVirt is a virtual datacenter manager that delivers powerful management of multiple virtual machines on multiple hosts. Using KVM and libvirt, oVirt can be installed on Fedora, CentOS, or Red Hat Enterprise Linux hosts to set up and manage your virtual data center.
What is Gerrit?
Code hosting (git frontend)
What is a hook?
For each workflow step (event) a script gets executed
Default gerrit hooks flaws:
Solution:
Build a dispatcher!
What?
Label: label content
Where?
Commit message
Comment
Example:
Bug-Url: http://mytracker/bugid
Rerun-Hooks: all
Hook name template:
${event}.${chain}.${hook_name}
${event}.${hook_name}
${event}
INFO::STARTING::change-merged
DEBUG::get_hooks::change-merged on vdsm.git/hooks
INFO::::AVAILABLE HOOKS::[
'change-merged.set_MODIFIED',
'change-merged.update_tracker']
Each hook can:
Everything to logfile (configurable):
Common stdout format (each section is optional):
V:VERIFIED SCORE\n
R:REVIEW SCORE\n
COMMENT
Sum of all the reviews:
Execution summary of all the hooks:
Patches are always welcome!
Some simple generic libs available for the hooks:
source bz.sh
source gerrit.sh
gerrit.parse_params "$@" # Sets the parameters into global vars
# get the bug ids in the commit message of the commit passed as
# parameter (--commit SHA)
bug_ids=($(bz.get_bug_id "$commit"))
from gerrit import Gerrit
from config import load_config
config = load_config() ## Loads the config hierarchicaly into a dict
gerrit = Gerrit(config.get('GERRIT_SRV')) ## Connect to the gerrit instance
Update external tracker in bugzilla
Modify bug status when first patch sent
Problems with manual configuration
...
Add an extra scm to jobs for projects A, B and C
New branch for project M, duplicate all it's jobs
Disable all the jobs for a project
Test a job configuration before deploying
Jenkins job Builder to the rescue!
Some plugins that helped along the way:
Matrix configurations
Configuration slice
Job Config history
Scriptler
- job-group:
name: projectA
dist:
- fc19
- fc20
jobs:
- '{name}-wahtever-{dist}'
- job-template:
name: '{name}-whatever-{dist}'
node: 'slave-{dist}'
triggers:
- timed: '@midnight'
builders:
- shell: make whatever
publishers:
- archive:
artifacts: '*.log'
Oh! But I want to add a new distro, el6
- job-group:
name: projectA
dist:
- fc19
- fc20
- el6
jobs:
- '{name}-wahtever-{dist}'
And a cleanup after
- job-template:
name: '{name}-whatever-{dist}'
node: 'slave-{dist}'
triggers:
- timed: '@midnight'
builders:
- shell: make whatever
- shell: make clean
publishers:
- archive:
artifacts: '*.log'
Official Openstack links:
Docs:
Code:
oVirt links
Scarce resources
Isolate test environments
Leverage package builds