Mechanical Octopus
Updated 2,262 Days AgoPublic

Technical Assesment

TODO

Progress done

  • There is a stub of the new KCI here: http://gpul.grupos.udc.es:8080/
  • There is a '3.0' branch in Kubuntu Automation's git aiming to provide a proper tooling for this new KCI.

Related task board items

TODO

  • Complete the Operation Kraken so Tritemio could be used as building backend in order to avoid abusing the LP building infrastructure for the new WIP KCI.

Jenkins Setup Working Notes

How to install jenkins

wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
echo deb http://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list
sudo apt update
sudo apt install jenkins

Source: https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-16-04

Force language to 'en'

  • Install the "Locale Plugin"
  • Go to "Manage Jenkins" -> "Configure System"
  • Go to the locale section and set 'en' as language, check "force language for all users"

Authentication

  • Install the 'Role Strategy' plugin
  • Install the OpenID plugin
  • Create the roles admin/members/readers, set the permissions as they are in the old KCI
  • Go to the global security configuration and pick "OpenID SSO" and set this url as provider: https://login.launchpad.net/+openid
  • Select "Role-based Strategy" as "authorization"
  • Uncheck "CSRF Protection" (otherwise we won't be able to login with LP/OpenID)
  • Test that you can log in from launchpad (if possible from other browser, because if you log out and you try to log in you may not be able to enter again if you didn't get the configuration right)

Create a sample pipeline

  • Install the multiple SCM's plugin
  • Install the Git plugin
  • Install KA in the same host where jenkins installed
  • Add racnoss.kde.org to the .ssh/known_hosts of 'jenkins' user:
su jenkins
mkdir .ssh
chmod 0700 .ssh
ssh-keyscan racnoss.kde.org >> .ssh/known_hosts
[gbp-*]
# Check if the current branch is valid for the distribution
# given with '-d <distribution>'
kubuntu-check-valid-branch = off
  • In the new pipeline, add the git repositories for extra-cmake-modules:
https://git.launchpad.net/~kubuntu-packagers/kubuntu-packaging/+git/extra-cmake-modules
https://anongit.kde.org/extra-cmake-modules.git
(put each one in a subdirectory source/packaging)
  • Activate the SCM polling
  • Set as shell command "cd packaging && get-kci-tarball && gbp-kadev -d artful"

Green Balls

  • Install the "green balls" plugin to get green balls instead of blue for successful results

Create a task/pipeline with shell commands

  • Go to "Jenkins -> Manage Jenkins -> Jenkins CLI"
  • Download http://<jenkins_host>:8080/jnlpJars/jenkins-cli.jar
  • This would give us the console output of artful_unstable_extra-cmake-modules:
java -jar jenkins-cli.jar -s http://<jenkins_host>:8080 -auth <user>:<api_token> \
      console artful_unstable_extra-cmake-modules
  • Download /var/lib/lxd/containers/j1/rootfs/var/lib/jenkins/jobs/artful_unstable_extra-cmake-modules/config.xml
  • Change config.xml to adapt it for kcoreaddons
  • This would create a new task/pipeline for kcoreaddons:
cat config.xml | java -jar jenkins-cli.jar -s http://<jenkins_host>:8080 -auth <user>:<api_token> \
      create-job artful_unstable-kcoreaddons
Last Author
joselema
Projects
None
Subscribers
None