Difference: JenkinsConfiguration (1 vs. 3)

Revision 32011-12-16 - andpol

Line: 1 to 1
 
META TOPICPARENT name="VirtualizationProjectHome"

What is Jenkins?

"Jenkins provides continuous integration services for software development, primarily in the Java programming language. It is a server-based system running in a servlet container such as Apache Tomcat. It supports SCM tools including CVS, Subversion, Git, Mercurial and Clearcase, and can execute Apache Ant and Apache Maven based projects as well as arbitrary shell scripts and Windows batch commands. The primary developer of Jenkins is Kohsuke Kawaguchi. Released under the MIT License, Jenkins is free software." - from Wikipedia
Line: 29 to 29
 
  • Under "Source Code Management" select "Git" and enter the URL of the github repository
  • Under "Build Triggers" check off "Build when a change is pushed to GitHub"
  • Under "Build" add an "Execute Shell" Build Step (or whatever is appropriate), and enter the following text: python pyUnit.py
Changed:
<
<
>
>
  • Clone a local copy of your git repo: git clone git://github.com/username/reponame.git
 
  • Download and add the file pyUnit.py: git add pyUnit.py
  • Commit the changes: git commit -m "A basic unit test"
  • Push changes up to github: git push origin master

Revision 22011-10-20 - andpol

Line: 1 to 1
 
META TOPICPARENT name="VirtualizationProjectHome"

What is Jenkins?

"Jenkins provides continuous integration services for software development, primarily in the Java programming language. It is a server-based system running in a servlet container such as Apache Tomcat. It supports SCM tools including CVS, Subversion, Git, Mercurial and Clearcase, and can execute Apache Ant and Apache Maven based projects as well as arbitrary shell scripts and Windows batch commands. The primary developer of Jenkins is Kohsuke Kawaguchi. Released under the MIT License, Jenkins is free software." - from Wikipedia
Line: 13 to 13
 

Installation

  • Download the latest version
  • Run it with java -jar jenkins.war
Changed:
<
<
>
>
 
  • Open up the Jenkins Dashboard in a browser.
  • From home page: Manage Jenkins -> Manage Plugins -> Available Plugins
  • Install "Github Plugin"

Configuration with GitHub

  • Go to Jenkins global configuration page: Manage Jenkins -> Configure System
Changed:
<
<
  • Configure the GitHub Web Hook either manually per repo or automatic per job (see this link for more details)
  • Once configured correctly, github will send a HTTP POST message to Jenkins whenever a commits are pushed to the repo
>
>
  • Configure the GitHub Web Hook either manually per repo or for automatic configuration (see this link for more details)
  • Once configured correctly, github will send a HTTP POST message to Jenkins whenever a commits are pushed to the repository.
 

Test Job

Changed:
<
<
  • Create a new Job with the title "Test" and select the "Build a free-style software project" option.
>
>
  • Create an empty github repository and ensure either the repo is configured to send Web Hooks to Jenkins, or you've correctly configured Jenkins to do so automatically (see above section).
  • Create a new Job with the title "jenkinsTest" (or whatever you feel like calling it) and select the "Build a free-style software project" option.
 
  • Under "Source Code Management" select "Git" and enter the URL of the github repository
  • Under "Build Triggers" check off "Build when a change is pushed to GitHub"
Changed:
<
<
  • Under "Build" add an "Execute Shell" Build Step (or whatever is appropriate)
>
>
  • Under "Build" add an "Execute Shell" Build Step (or whatever is appropriate), and enter the following text: python pyUnit.py
  • Clone a local copy of your git repo: =git clone https://github.com/username/reponame.git=
  • Download and add the file pyUnit.py: git add pyUnit.py
  • Commit the changes: git commit -m "A basic unit test"
  • Push changes up to github: git push origin master
  • Now monitor the Jenkins Dashboard and you should see that a new build should start automatically and pass..
  • Note: Jenkins does not support SSH keys with a passphrase. So if you have the terminal window where Jenkins was started open, you should check if it's waiting for a passphrase entry. To avoid the prompt, use ssh-agent (the command is ssh-add), or use a passphraseless SSH key.
  • To test a failed build: modify pyUnit.py so that the assertion looks like self.assertEqual(1,0), then commit and push the changes to github.
 

-- AndreyPolyakov - 2011-10-19

Added:
>
>
META FILEATTACHMENT attachment="pyUnit.py.txt" attr="" comment="" date="1319129510" name="pyUnit.py.txt" path="pyUnit.py.txt" size="280" user="andpol" version="1"

Revision 12011-10-19 - andpol

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="VirtualizationProjectHome"

What is Jenkins?

"Jenkins provides continuous integration services for software development, primarily in the Java programming language. It is a server-based system running in a servlet container such as Apache Tomcat. It supports SCM tools including CVS, Subversion, Git, Mercurial and Clearcase, and can execute Apache Ant and Apache Maven based projects as well as arbitrary shell scripts and Windows batch commands. The primary developer of Jenkins is Kohsuke Kawaguchi. Released under the MIT License, Jenkins is free software." - from Wikipedia

In plain English, Jenkins allows you to automate the testing of software. Software tests can be written in basically anything and then executed through shell scripts. The tests can be triggered manually, on a schedule, or when new code is committed to the repository. Jenkins supports CVS, SVN, Git, Mercurial, and Clearcase either natively or through plugin support.

Links

Installation

  • Download the latest version
  • Run it with java -jar jenkins.war
  • Access Jenkins Dashboard through localhost:8080
  • Open up the Jenkins Dashboard in a browser.
  • From home page: Manage Jenkins -> Manage Plugins -> Available Plugins
  • Install "Github Plugin"

Configuration with GitHub

  • Go to Jenkins global configuration page: Manage Jenkins -> Configure System
  • Configure the GitHub Web Hook either manually per repo or automatic per job (see this link for more details)
  • Once configured correctly, github will send a HTTP POST message to Jenkins whenever a commits are pushed to the repo

Test Job

  • Create a new Job with the title "Test" and select the "Build a free-style software project" option.
  • Under "Source Code Management" select "Git" and enter the URL of the github repository
  • Under "Build Triggers" check off "Build when a change is pushed to GitHub"
  • Under "Build" add an "Execute Shell" Build Step (or whatever is appropriate)

-- AndreyPolyakov - 2011-10-19

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback