首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

怎么用Jenkins/Hudson自动构建OpenELEC

2012-07-04 
如何用Jenkins/Hudson自动构建OpenELEC??http://openelec.tv/forum/20-development-discussion/16247-how-

如何用Jenkins/Hudson自动构建OpenELEC

?

?

http://openelec.tv/forum/20-development-discussion/16247-how-to-build-openelec-using-hudsonjenkins-ci-continuous-integration-server#36754

?

Here are the steps that I took to get Hudson/Jenkins (I moved to Jenkins as it is updated more frequently) up and running in n Ubuntu 11.04 x64 Hyper-V VM. This tutorial assumes you already know how to set up Ubuntu to build openelec...if not, search on here for a guide on what you need. This guide should also work on VMware Virtual Machines, but I'm using Hyper V.


1.)Install Ubuntu Server Choosing Tomcat, SSH, and optionally Samba (if you want to pull files from windows). After you have Ubuntu installed, follow the directions here on how to get Ubuntu set up for hyper-v.

1a.) Configure Ubuntu for building. you can use the following command:

怎么用Jenkins/Hudson自动构建OpenELEC

5.)Now that Hudson is installed, you'll need to add the Git plugin, if not already installed. To do this, go to "Manage Hudson" -> "Manage Plugins" -> Click "Available", and look for the "Git" SCM plugin. Once you install the plugin, you'll need to have Hudson restart, so click the box at the bottom. Once it restarts, you can continue.

6.) Configure the Git username/email: Click "Manage Hudson" and look for the GIT data, enter your username and email address so git can know who you are:
怎么用Jenkins/Hudson自动构建OpenELEC

7.) Configure a project

a.) Select New projectb.) Enter a name for the project (Note, cannot contain spaces...OpenELEC will not build)怎么用Jenkins/Hudson自动构建OpenELECc.) Make sure you select "Build a free-style software project" and then click "OK"d.) Enter the following information, in the correct boxes

?

    Github Project: github.com/OpenELEC/OpenELEC.tv/ Source Code Management: Click Git, enter "github.com/OpenELEC/OpenELEC.tv.git" for Repository, then click advanced, and make sure you have the following:怎么用Jenkins/Hudson自动构建OpenELECbranches to build: master怎么用Jenkins/Hudson自动构建OpenELECUnder "Build" click "add build step" and select "execute Shell"怎么用Jenkins/Hudson自动构建OpenELECNote: you'll need to make a shell script and put it somewhere, like your /home/user directory. For a simple build script, you can use something like the following:call it something like "buildion64.sh" or whatever, give it +x permissions by chmoding +x, and remember where you saved it. In the screenshot above, you can see I entered it already, you'll have to enter yours just like I did, where it says "sh /home/<user>/blah.sh"



That's pretty much all you need to get it up and running. Once you save your Job, you can create new ones. If you install the "template" plugin, you can use previously created jobs to fast-make new ones. Make sure you setup a .sh script to build each project you want. One major note. This by default will create separate folders for EACH build you make, so if you go and build 6 different versions (like I do) it's going to clone the git project 6 times. That will take up a lot of disk space, so you may want to go in to your advanced project properties (click the button) and set the workspace to be the same, such as mine:



Note #2: When you build for the first time, it won't give you an ETA. Once you successfully build however, it should be able to try and predict how long new builds will take (uses the last build time.) If you'd rather use Jenkins, you can Google how to switch from Hudson to Jenkins, it takes about 2 seconds to do and you don't loose any of your jobs.

Note #3: Per "MikeBuzz", you may need to do the following as well. I did not, but he did on his system if you get errors with git when pulling for the first time:

HTPC: Zotac ION-A-U with 4GB ram & 32GB SSD
Build box/File Server: W2k8 R2, AMD x3 455, 14TB RAID 5 with 2TB Samsung HD204UI drives.

Too lazy to roll your own builds? take mine: http://www.mediafire.com/openelec
Want to check my build status? check here:EvanRich's Jenkins CI server

热点排行