Difference between revisions of "Jenkins"

From RobotinoWiki
(Created page with "==Install Jenkins== <pre> apt install openjdk-8-jdk wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - </pre>")
 
(Jenkins Tuning)
 
(19 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
apt install openjdk-8-jdk
 
apt install openjdk-8-jdk
 
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
 
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
 
</pre>
 
</pre>
 +
 +
==Jenkins Browser init Setup and Plugins follow on==
 +
 +
https://localhost:8080
 +
 +
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:
 +
<pre>
 +
Webgui --> Manage Jenkins --> Configure Global Security:
 +
- Authorization -> Anyone can do anything
 +
</pre>
 +
 +
Configure only one Executor:
 +
<pre>
 +
Webgui --> Manage Jenkins --> Configure System:
 +
Maven Project Configuration # of executors 1
 +
</pre>
 +
 +
==Packages==
 +
[[Debrepository|Robotino repository]]
 +
 +
<pre>
 +
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
 +
</pre>
 +
 +
==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)===
 +
<pre>
 +
mkdir /opt/smartsoft_jenkins
 +
/opt
 +
ln -s smartsoft_jenkins smartsoft
 +
chmod 777 smartsoft
 +
</pre>
 +
 +
<pre>
 +
echo "export SMART_ROOT_ACE=/opt/smartsoft" > /etc/profile.d/smartsoft.sh
 +
source /etc/profile
 +
</pre>
 +
 +
 +
===init checkout sources, to an other location===
 +
<pre>
 +
mkdir -p ~/SOFTWARE/smartsoft_init_co
 +
cd ~/SOFTWARE/smartsoft_init_co
 +
svn checkout https://svn.code.sf.net/p/smartsoft-ace/code/trunk .
 +
</pre>
 +
 +
 +
===Install SmartSoft Kernel jenkins JOBS===
 +
<pre>
 +
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
 +
</pre>
 +
 +
===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
 +
<pre>
 +
cd ~/SOFTWARE/smartsoft_init_co/src/utilities/jenkins_tools
 +
bash ./install-jenkins-jobs-from-repo.sh ~/smartrobotino/components
 +
</pre>
 +
 +
===Robotino Files jenkins JOBS - master slave common===
 +
<pre>
 +
cd ~/smartrobotino/utils/jenkins_files/
 +
bash ./install-robotino_files-jenkins-job.sh
 +
</pre>
 +
 +
==Jenkins Tuning==
 +
===Create Views to Sort the jobs (webgui)===
 +
 +
<pre>
 +
CommObjects --> <all CommObjects>
 +
</pre>
 +
 +
<pre>
 +
Kernel + Util --> SmartSoft-kernel SmartSoft-utilities breakpad
 +
</pre>
 +
 +
<pre>
 +
Components --> <all generic components>
 +
</pre>
 +
 +
<pre>
 +
Robotino_Components --> all robotino Components
 +
</pre>
 +
 +
<pre>
 +
Interpreted File --> SmartJobDispachter_lisp SmartLispServer_lisp
 +
SmartSimpleKB_lisp SmartTCL utilities_cl-json
 +
</pre>
 +
 +
<pre>
 +
Other Files --> Files_for_compilation_ONLY SmartSoft_files_common
 +
SmartSoft_files_master    SmartSoft_files_slave
 +
</pre>
 +
 +
===Set Prioritization of Jobs===
 +
 +
Select Job Priorities (in main Menu jenkins)
 +
Grouping via views add the following:
 +
-- Kernel + Util (Prio 1)
 +
-- CommObjects (Prio 2)

Latest revision as of 12:09, 15 May 2019

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

https://localhost:8080

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

Robotino repository

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)