BOSS comes with a sample "standard workflow" which consists of:
This is not a mandatory workflow but was developed at Nokia and is designed to be useful for MeeGo vendors
Contents |
GIT : https://meego.gitorious.org/meego-infrastructure-tools/boss-launcher-robogrator NOTE: skynet branch for now
Robogrator is the robotic package integrator. It reacts to the events occuring on the OBS and looks at the data inside to identify which project-specific process to launch.
Installation is as boss-launcher-robogrator:
apt-get install boss-launcher-robogrator
or
zypper in boss-launcher-robogrator
NOTE: robogrator is the package name , the participant name in processes is obs_event so register the participant with skynet by invoking the command :
skynet register -n obs_event
It uses the data sent by the obs-boss-plugin to launch a fresh process.
All processes have the fields:
For the actual process, robogrator uses the namespace/project/event-label to find a specific ruote process.
For the standard workflow the first participant is the standard_workflow_handler
It is configured in /etc/skynet/robogrator.conf
This participant serves two purposes:
For a standard installation the following script would enable Project:CE:Trunk
cat <<EOF > /srv/BOSS/processes/standard_workflow
Ruote.process_definition :name => 'BOSS_Standard_Workflow' do
sequence do
standard_workflow_handler
done
done
EOF
PROJ=Project:CE:Trunk
PDIR=/srv/BOSS/processes/${PROJ//:/\/}
mkdir -p $PDIR
for ev in SRCSRV_COMMIT REPO_PUBLISHED BUILD_UNCHANGED BUILD_FAIL BUILD_SUCCESS SRCSRV_VERSION_CHANGE SRCSRV_DELETE_PACKAGE SRCSRV_REQUEST_CREATE; do
ln -s /srv/BOSS/processes/standard_workflow $PDIR/$ev
done
skynet enable standard_workflow
skynet register -n standard_workflow
Ruote.process_definition :name => 'DE_Trunk_SRs' do
sequence do
set 'irc_channel' => '#meego-arm'
set 'archs' => ['i586', 'armv8el']
set 'targetrepo' => 'standard'
set 'debug_dump' => 'true'
set 'final_project' => 'Project:DE:Trunk'
# REVS baseline
set 'baseline' => 'Trunk'
# REVS platform
set 'platform' => 'DE'
echo "Start SRCSRV_REQUEST : ${ev.state} in ${project}"
notify_irc :msg => 'lbt : New SR#${ev.id}(${ev.state}) in ${project}', :irc_channel=> '#meego-boss'
# CREATE or supersede
_if '${ev.state} == new' do
do_create
end
_if '${ev.state} == superseded' do
notify_irc :msg => 'SR#${ev.id} superseded in ${project} - FYI', :irc_channel=> '${irc_channel}'
end
_if '${ev.state} == accepted' do
do_accepted
end
_if '${ev.state} == declined' do
do_declined
end
end
define 'do_create' do
echo "${project} SRCSRV_REQUEST : do_create"
notify_irc :msg => 'New SR#${ev.id} in ${project} from ${ev.author} ${ev.actions.0.sourceproject}/${ev.actions.0.sourcepackage} to ${ev.actions.0.targetpackage}: ${ev.description} : https://build.pub.meego.com/request/show/${ev.id}', :irc_channel=> '${irc_channel}'
echo "check _if '${project} == ${final_project}'"
_if '"${project}" == "${final_project}"' do
do_final_checks
#else
do_testing_checks
end
end
define 'do_accepted' do
echo "${project} SRCSRV_REQUEST : do_accepted"
get_relevant_changelog :compare => "last_revision"
echo "check _if '${project} == ${final_project}'"
_if '"${project}" == "${final_project}"' do
sequence do
# bugzilla :status => 'RESOLVED', :resolution => 'FIXED', :relevant_bugs => "yes", :template => '/srv/BOSS/bz_comments/meego-DE'
bugzilla :relevant_bugs => "yes", :template => '/srv/BOSS/bz_comments/meego-DE'
get_changelog
revs_de_update
end
#else
bugzilla :relevant_bugs => "yes", :template => '/srv/BOSS/bz_comments/meego-DE'
end
notify_irc :msg => '${ev.who} accepted SR#${ev.id} in ${project} from ${ev.author} ${ev.actions.0.sourceproject}/${ev.actions.0.sourcepackage} to ${ev.actions.0.targetpackage}: ${ev.comment} https://build.pub.meego.com/request/show/${ev.id}', :irc_channel=> '${irc_channel}'
end
define 'do_declined' do
echo "${project} SRCSRV_REQUEST : do_declined"
notify_irc :msg => '${ev.who} declined SR#${ev.id} in ${project} from ${ev.author} ${ev.actions.0.sourceproject}/${ev.actions.0.sourcepackage} to ${ev.actions.0.targetpackage}: ${ev.comment} https://build.pub.meego.com/request/show/${ev.id}', :irc_channel=> '${irc_channel}'
end
define 'do_testing_checks' do
echo "${project} SRCSRV_REQUEST : do_testing_checks"
cursor :break_if => '${__result__} == false' do
check_submitter_maintainer
check_package_built_at_source
# check_package_is_complete
# check_spec
end
_if '${__result__} == false' do
do_decline
#else
do_accept
end
end
define 'do_final_checks' do
echo "${project} SRCSRV_REQUEST : do_final_checks"
cursor :break_if => '${__result__} == false' do
check_submitter_maintainer
# check_package_built_at_source
# check_package_is_complete
# check_spec
end
_if '${__result__} == false' do
do_decline
#else
do_accept
end
end
define 'do_accept' do
echo "${project} SRCSRV_REQUEST : do_accept"
# notify_irc :msg => 'Tests pass for SR#${ev.id} in ${project} from ${ev.author}', :irc_channel=> '${irc_channel}'
end
define 'do_decline' do
echo "${project} SRCSRV_REQUEST : do_decline"
# notify_irc :msg => 'BOSS suggests decline: Tests fail for SR#${ev.id} in ${project} from ${ev.author}', :irc_channel => '${irc_channel}'
end
end