βIn a nutshell, Jenkins is the leading open source automation server. Built with Java, it provides hundreds of plugins to support building, testing, deploying and automation for virtually any project.β β From the Jenkins CI web site.
On master
, install the Jenkins CI master service:
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - sudo sh -ec 'echo deb http://pkg.jenkins-ci.org/debian binary/ >> /etc/apt/sources.list.d/jenkins.list' sudo apt-get update sudo apt-get install jenkins
Once installed, Jenkins defaults to allow anyone who visits the page to create and run jobs; this is probably not how you want to run in production so we'll fix that with a little configuration.
On client
:
Our first job is simple, run the /usr/bin/w
command on master.
On client
:
Run w
as a descriptive titleOK
Run the Unix w command
Execute shell
w
in the Command box or fully specify /usr/bin/w
Congratulations! You just created your first Jenkins job.
Now that we have a job, run it.
On client
:
Run w
in the Name columnBuild Now
in the menu on the leftYou may see a Build scheduled notification then a blue dot with a #1 should appear in the Build History pane.
Congratulations! You just ran your first Jenkins job.
So, how do you know anything actually happened? What does the little blue dot mean?
#1
link under Build History to see the build status for that run
This is the Console Output of the Run w job which runs the /usr/bin/w
Unix command:
Started by user Curry Searle Building in workspace /var/lib/jenkins/jobs/Run w/workspace [workspace] $ /bin/sh -xe /tmp/hudson2725330295819146079.sh + w 19:48:05 up 9:17, 1 user, load average: 0.01, 0.04, 0.05 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT waytta pts/0 192.168.1.138 10:33 12:04 3.26s 3.26s -bash Finished: SUCCESS
Congratulations! You completed this lesson.