Jenkins: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Martijn
m (Removed protection from "Jenkins")
(48 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{DevsHeader|'''XBMC Development - Team info'''}}<br />
{{mininav|[[Team Kodi]]{{l2|[[Development]]}}|[[:Category:Team Kodi specific notes]]<br />&nbsp;}}


This page describes the "Jenkins" builder used by [[Team XBMC]] to build the variety of releases from Team XBMC
<section begin="intro" />This page describes the "Jenkins" builder used by [[Team Kodi]] to build the variety of releases of Kodi.<section end="intro" />


== Jenkins ==
== Jenkins ==


[[File:Jenkins_Start.JPG|left|300px| ]]
Jenkins is the successor of [[Buildbot]] which was harder to maintain and Jenkins also offers a wide variety of plugin that can be used to benefit further development and testing.
Jenkins is the successor of [[Buildbot]] which was harder to maintain and Jenkins also offers a wide variety of plugin that can be used to benefit further development and testing.


When going to http://jenkins.xbmc.org you are shown the current frontpage like shown below and you start at the ''dashboard'' giving you several build statistics and overview of current used builders.
When going to http://jenkins.kodi.tv you are shown the current frontpage like shown below and you start at the ''dashboard'' giving you several build statistics and overview of current used builders.
 
[[Image:Jenkins_start.jpg|thumb|400px| ]]
 


You also see tabs for each platform that contain specific builders for each one of those.
You also see tabs for each platform that contain specific builders for each one of those.
 
The ''helpers'' contains like the name says helpers that can aid in doing quick builds like ''build all platforms'' or uploading of Kodi releases to our mirrors.
The ''helpers'' contains like the name says helpers that can aid in doing quick builds or uploading of XBMC releases.
{{-}}


== Building ==
== Building ==


Building using Jenkins is only allowed by XBMC Team members. Team members that have XBMC git rights are allowed to use these builders.
Building using Jenkins is only possible if given access from Team Kodi administrators and is restricted to Team Kodi members.




=== Automated builds ===
=== Automated builds ===


Automated build are started at a specific time which can be configured at for each job.
At the moment we use the job '''BuildMulti-All''' which is triggered by a timer to create the nightly builds each day. These timed builds are considered '''nightly builds''' and are uploaded to http://mirrors.kodi.tv/nightlies/
At the moment we use the job '''XBMC-BuildAll''' which is triggered by a timer.
It starts the list of separate jobs listed below and by default will build the '''master''' branch from https://github.com/xbmc/xbmc
It starts the list of separate jobs listed below and by default will build the '''master''' branch from https://github.com/xbmc/xbmc
* XBMC-Android-ARM
* Android-ARM
* XBMC-IOS-ATV
* Android-ARM64-v8a
* XBMC-OSX-32
* Android-X86
* XBMC-OSX-64
* iOS
* XBMC-WIN-32
* LINUX-64
* LINUX-RBPI
* OSX-64
* WIN-32


Timed builds are considered '''nightly builds''' and are uploaded to http://mirrors.xbmc.org/nightlies/
During Kodi RC and Final stage these builds might be switched to build the release branch. The purpose for this is to have continues testing until final release on the release branch of Kodi.


== Starting manual build ==
== Starting manual build ==


To start a manual build to build a certain release or just for testing/compiling purpose you must use the '''XBMC-BuildAll''' job.
To start a manual build to build a certain release or just for testing/compiling purpose you have two choices.
By clicking on the '''XBMC-BuildAll''' job you get several options on the left side. Click on '''Start a new build'''.
 
Now you get the following options:
=== Specific platform ===
* Configuration [default/release/debug]
 
* Revision [Branch/Tag/Commit]
{| class="wikitable" border="1"
* Upload result (enable this to upload the finished build to http://mirrors.xbmc.org/test-builds/ )
| [[File:Jenkins_platforms.jpg|left|300px| ]] || To build a specific platform you must click on the platform of choice you want.
* Github repo (provide the repository from which you want to build)
|-
| [[File:Jenkins_singlebuild1.jpg|left|300px| ]] || After that you are presented with the following screen (some option may not be visible to you due to restrictions).
This gives an overview of the available option and the build history of the platform.
 
To start a build click on '''Build Now'' where you can provide the necessary information on what you want to build.
|-
| [[File:Jenkins_singlebuild2.jpg|left|300px| ]] || Here you can choose what type of release you want to build, branch/tag or commit (REVISION) and the github account the branch is located in (GITHUB_REPO).  If you want to upload the finished build to the server http://mirrors.kodi.tv/test-builds/  check the box to upload it.
 
Do note if you just want to do a compile run, please disable uploading the results as this will save in total time needed and won't upload unnecessary builds to our mirrors.
|}
 
Once you started building you can follow it's progress with the progress bars or click on the console to view the compiling progress.
 
=== Build all platforms ===
 
[[File:Jenkins_buildall1.jpg|left|300px| ]]
By clicking on the '''XBMC-BuildMulti-All''' job in the ''helper'' tab you get several options on the left side just like on a single platform build. Click on '''Start a new build'''.
This process is the same as the single builds for each platforms with the only change this will trigger each individual builder that is currently linked to this build job.
{{-}}
 
 
==Jenkins & Github Integration==
===Testing Pull Requests===
 
Before merging a pull request a Jenkins build must be triggered to ensure all platforms that are enabled continue to compile. Which are usually the same as the automated builds. After the pull request has been successfully built by Jenkins then the pull request will show that it is "safe to merge".
<br />
 
The following trigger phrases can be commented to pull requests by team members:
<br />
* '''jenkins build this please''' - jenkins builds the PR and sets the PR status after that
* '''jenkins build this with addons please''' - jenkins builds the PR and add-ons and sets the PR status after that
* '''jenkins build and merge''' - jenkins builds the PR and if successfull merges it to master
* '''jenkins build addons please''' - jenkins builds the binary addons from a PR and sets the PR status after that
* '''jenkins build kore''' - jenkins builds the official kodi remote "Kore" and sets the PR status after that
* '''jenkins build kore and merge''' - jenkins builds the official kodi remote "Kore" and if successfull merges it to master
 
'''Note -''' This will only work for Team Kodi members who have github commit rights, or alternative Team Kodi members who don't have commit rights but have been added to the special "jenkins-access" team on github (the list of these members is at '''[https://github.com/orgs/xbmc/teams/jenkins-access Jenkins-Access]''')


Now hit '''Build'''. This will start all attached platform job using the configuration you provided.
===Configure Jenkins & Github Integration===
Described below are the Steps required to make sure you are authorised to trigger Jenkins build on Github.
{{collapse top|Click "Expand" to see the steps required to configure Jenkins & Github integration}}


You can also start a build for a specific platform using the same method as '''XBMC-BuildAll'''.
<gallery widths=500px heights=400px>
File:jenkinsgithub1.jpg|'''Step 1:''' From XBMC Foundation page https://github.com/xbmc select "People"
File:jenkinsgithub2.jpg|'''Step 2:''' Find your username then check "Organisation visibility" is set to "Public"
File:jenkinsgithub3.jpg|'''Step 3:''' Go to http://jenkins.kodi.tv and log in
File:jenkinsgithub4.jpg|'''Step 4:''' You should be presented with the Authorize application screen, select "Authorize application"
File:jenkinsgithub5.jpg|'''Step 5:''' Go to your Github "Personal settings" and "Applications" and you should see an entry for "jenkins.kodi.tv"
</gallery>
{{collapse bottom}}
{{-}}


==See also==
== See also ==
*[[XBMC development]]
* [[Development]]
*[[Git Usage]]
* [[Git Usage]]
*[[HOW-TO:Submit a patch]]
* [[HOW-TO:Submit a patch]]


[[Category:Development]]
[[Category:Development]]
[[Category:Team XBMC specific notes]]
[[Category:Team Kodi specific notes]]

Revision as of 23:47, 2 October 2016

Home icon grey.png   ▶ Team Kodi
▶ Development
▶ Category:Team Kodi specific notes
 
▶ Jenkins

This page describes the "Jenkins" builder used by Team Kodi to build the variety of releases of Kodi.

Jenkins

Jenkins Start.JPG

Jenkins is the successor of Buildbot which was harder to maintain and Jenkins also offers a wide variety of plugin that can be used to benefit further development and testing.

When going to http://jenkins.kodi.tv you are shown the current frontpage like shown below and you start at the dashboard giving you several build statistics and overview of current used builders.

You also see tabs for each platform that contain specific builders for each one of those. The helpers contains like the name says helpers that can aid in doing quick builds like build all platforms or uploading of Kodi releases to our mirrors.

Building

Building using Jenkins is only possible if given access from Team Kodi administrators and is restricted to Team Kodi members.


Automated builds

At the moment we use the job BuildMulti-All which is triggered by a timer to create the nightly builds each day. These timed builds are considered nightly builds and are uploaded to http://mirrors.kodi.tv/nightlies/ It starts the list of separate jobs listed below and by default will build the master branch from https://github.com/xbmc/xbmc

  • Android-ARM
  • Android-ARM64-v8a
  • Android-X86
  • iOS
  • LINUX-64
  • LINUX-RBPI
  • OSX-64
  • WIN-32

During Kodi RC and Final stage these builds might be switched to build the release branch. The purpose for this is to have continues testing until final release on the release branch of Kodi.

Starting manual build

To start a manual build to build a certain release or just for testing/compiling purpose you have two choices.

Specific platform

Jenkins platforms.jpg
To build a specific platform you must click on the platform of choice you want.
Jenkins singlebuild1.jpg
After that you are presented with the following screen (some option may not be visible to you due to restrictions).

This gives an overview of the available option and the build history of the platform.

To start a build click on 'Build Now where you can provide the necessary information on what you want to build.

Jenkins singlebuild2.jpg
Here you can choose what type of release you want to build, branch/tag or commit (REVISION) and the github account the branch is located in (GITHUB_REPO). If you want to upload the finished build to the server http://mirrors.kodi.tv/test-builds/ check the box to upload it.

Do note if you just want to do a compile run, please disable uploading the results as this will save in total time needed and won't upload unnecessary builds to our mirrors.

Once you started building you can follow it's progress with the progress bars or click on the console to view the compiling progress.

Build all platforms

Jenkins buildall1.jpg

By clicking on the XBMC-BuildMulti-All job in the helper tab you get several options on the left side just like on a single platform build. Click on Start a new build. This process is the same as the single builds for each platforms with the only change this will trigger each individual builder that is currently linked to this build job.


Jenkins & Github Integration

Testing Pull Requests

Before merging a pull request a Jenkins build must be triggered to ensure all platforms that are enabled continue to compile. Which are usually the same as the automated builds. After the pull request has been successfully built by Jenkins then the pull request will show that it is "safe to merge".

The following trigger phrases can be commented to pull requests by team members:

  • jenkins build this please - jenkins builds the PR and sets the PR status after that
  • jenkins build this with addons please - jenkins builds the PR and add-ons and sets the PR status after that
  • jenkins build and merge - jenkins builds the PR and if successfull merges it to master
  • jenkins build addons please - jenkins builds the binary addons from a PR and sets the PR status after that
  • jenkins build kore - jenkins builds the official kodi remote "Kore" and sets the PR status after that
  • jenkins build kore and merge - jenkins builds the official kodi remote "Kore" and if successfull merges it to master

Note - This will only work for Team Kodi members who have github commit rights, or alternative Team Kodi members who don't have commit rights but have been added to the special "jenkins-access" team on github (the list of these members is at Jenkins-Access)

Configure Jenkins & Github Integration

Described below are the Steps required to make sure you are authorised to trigger Jenkins build on Github.


See also