Rechercher dans ce blog

Affichage des articles dont le libellé est GitHub. Afficher tous les articles
Affichage des articles dont le libellé est GitHub. Afficher tous les articles

lundi 23 avril 2012

5. Jenkins (2/2)

Jenkins is now installed and configured. We will now configure it to work with Github and build the yocto-meteo project.

You should be able to access Jenkins through the previous URL on port 8080. For my case it is: http://192.158.1.59:8080


  1. Go in the plugins tab and select github plugin.
  2. Select install and restart jenkins afterward
Jenkins is now up and running but not configured yet. 

  1. Go in the configuration tab
  2. Jenkins virtual appliance is shipped with Sun java 1.6. Let's set it in the JDK section:
    • Select a name for the jdk
    • Unset the "Install automatically" flag
    • Set the JAVA_HOME path with /usr/lib/jvm/java
  3. Maven is available by default but set it to install it automatically in the Maven section
  4. In GitHub plugin:
    1. Set "Let Jenkins auto-manage hook URLs"
    2. Set your credentials to github
  5. Select Save. 
Now, we have a jenkins virtual appliance fully functional but we still need to configure the project... We will now create a build and junit job


  1. Select "New Job". 
  2. Set the name "yocto-meteo" and set the radio button: "Maven project". You should then see a big page where you can configure the job
  3. Select Git as the source code repository
  4. Enter the Git URL: https://github.com/jfontignie/yocto-meteo
  5. Select "Build when a change is pushed to GitHub. The build will be automatically performed every time submit something. It is very useful if you send an email when an issue is found. 
  6. Select "Build periodically" and enter "0 3 * * *". It will perform a build every night at 3 AM.
  7. Select "Check the versioning tool" and enter: "*/5 * * * *" in order to check for new changes every 5 minutes

Congratulations, you have now a build environment and a source code repository. We can now really start the project.



2. Github

The first thing we will put in place is the code repository. This is pretty easy and straightforward. The Source versioning tool we will use is GitHub.

To put the environment in place, we need git command-line and SSH, I did not have anything to do as it is included in macport...


  1. Create an account for  Git. I created a free account as the code is planned to be GPL, I did not bother about the licensing.
  2. I created a repository which is pretty straightforward. Please note that Github provides very useful information on how to put the environment in place.
  3. I generated an SSH key, and put the public key in Github. So that I can log to git without having to put the credentials.
  4. In Intellij idea, I set the VCS to Github and entered all the parameters to log on GitHub.


I can now access my code repository on: https://github.com/jfontignie/yocto-meteo. And that's all, the environment is ready for development.