Jenkins
From RobotinoWiki
Contents
Install Jenkins
apt install openjdk-8-jdk wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - echo "deb http://pkg.jenkins.io/debian-stable binary/" > /etc/apt/sources.list.d/jenkins.list apt-get update apt install jenkins
Jenkins Browser init Setup and Plugins follow on
Install suggested plug-ins, add the following plug-ins additionally:
- CMake
- Bulk Builder
- Debian Package Builder
- Multijob
- Priority Sorter Plugin
- Publish Over SSH
User and Permissions
Create user Account (one user should typically be ok)
Enable anonymous access to allow installation of jobs via scripts:
Webgui --> Manage Jenkins --> Configure Global Security: - Authorization -> Anyone can do anything
Configure only one Executor:
Webgui --> Manage Jenkins --> Configure System: Maven Project Configuration # of executors 1
Packages
apt-get install ssh-askpass git flex bison htop tree cmake cmake-curses-gui subversion sbcl doxygen meld expect wmctrl libboost-all-dev libftdi-dev build-essential pkg-config freeglut3-dev zlib1g-dev zlibc libusb-1.0-0-dev libdc1394-22-dev libavformat-dev libswscale-dev lib3ds-dev libjpeg-dev libgtest-dev libeigen3-dev libglew-dev vim vim-gnome libxml2-dev libxml++2.6-dev libmrpt-dev ssh sshfs xterm libjansson-dev libsystemd-dev git robotino-api2 robotino-dev gmapping ompl ompl-dev aruco libace-dev libopencv-dev libpcl-dev software-properties-common apt-get qt5-default libqt5serialport5-dev apt-key adv --keyserver keys.gnupg.net --recv-key C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 -- recv-key C8B3A55A6F3EFCDE add-apt-repository "deb http://realsense-hw-public.s3.amazonaws.com/Debian/apt-repo bionic main" -u apt-get install librealsense2-dev
SmartSoft Setup
If ACE is installed via package manager the env-var ACE_ROOT must not be set and must not be used in jenkins, when asked leave empty.
create target env (/opt/smartsoft)
mkdir /opt/smartsoft_jenkins /opt ln -s smartsoft_jenkins smartsoft chmod 777 smartsoft
echo "export SMART_ROOT_ACE=/opt/smartsoft" > /etc/profile.d/smartsoft.sh source /etc/profile
init checkout sources, to an other location
mkdir -p ~/SOFTWARE/smartsoft_init_co cd ~/SOFTWARE/smartsoft_init_co svn checkout https://svn.code.sf.net/p/smartsoft-ace/code/trunk .
Install SmartSoft Kernel jenkins JOBS
cd ~/SOFTWARE/smartsoft_init_co/src/utilities/jenkins_tools bash ./install-smartsoft-jenkins-job.sh bash ./install-smartsoft_interpretedfiles-jobs.sh bash ./install-jenkins-jobs-from-repo.sh ~/SOFTWARE/smartsoft_init_co/src/interfaceClasses bash ./install-jenkins-jobs-from-repo.sh ~/SOFTWARE/smartsoft_init_co/src/components
Install additional components from robotino repo
setup ssh key to work with git server, for both local and jenkins user and clone robotino git repo somewhere
cd ~/SOFTWARE/smartsoft_init_co/src/utilities/jenkins_tools bash ./install-jenkins-jobs-from-repo.sh ~/smartrobotino/components
Robotino Files jenkins JOBS - master slave common
cd ~/smartrobotino/utils/jenkins_files/ bash ./install-robotino_files-jenkins-job.sh
Jenkins Tuning
Create Views to Sort the jobs (webgui)
CommObjects --> <all CommObjects>
Kernel + Util --> SmartSoft-kernel SmartSoft-utilities breakpad
Components --> <all generic components>
Robotino_Components --> all robotino Components
Interpreted File --> SmartJobDispachter_lisp SmartLispServer_lisp
SmartSimpleKB_lisp SmartTCL utilities_cl-json
Other Files --> Files_for_compilation_ONLY SmartSoft_files_common
SmartSoft_files_master SmartSoft_files_slave
Set Prioritization of Jobs
Select Job Priorities (in main Menu jenkins) Grouping via views add the following: -- Kernel + Util (Prio 1) -- CommObjects (Prio 2)