Jenkins

From RobotinoWiki
Revision as of 10:11, 15 May 2019 by Verbeek (talk | contribs) (Packages)

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)===
<pre>
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


=============================

3.2 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 .


=============================

3.3 Install SmartSoft Kernel jenkins JOBS

cd ~/SOFTWARE/smartsoft_init_co/src/utilities/jenkins_tools
bash ./install-smartsoft-jenkins-job.sh
=============================

3.5 Install Jobs for interpreted files

cd ~/SOFTWARE/smartsoft_init_co/src/utilities/jenkins_tools
bash ./install-smartsoft_interpretedfiles-jobs.sh
=============================

3.4 Install CommObject + Component jenkins JOBS

 cd ~/SOFTWARE/smartsoft_init_co/src/utilities/jenkins_tools
 Install all CommObjects
 bash ./install-jenkins-jobs-from-repo.sh

~/SOFTWARE/smartsoft_init_co/src/interfaceClasses

 Install the required Components (yes/no can be selected)
 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

 bash ./install-jenkins-jobs-from-repo.sh

~/SOFTWARE/smartsoft_robotino/components


=============================

3.5 Robotino Files jenkins JOBS - master slave common

 In the robotino git repo in dir utils/jenkins_files/
 bash ./install-robotino_files-jenkins-job.sh