Jenkins seems to be the top code build, integration and QA automation tool to support continuous delivery.
Jenkins allows me to kick of jobs on a schedule or ofter certain events and Jenkins will keep track of the status of the jobs and the results.
To get Jenkins installed, I read wiki.jenkins-ci.org and then read biouno.org to try my first Jenkins example.
I installed Jenkins on one of the VMs from the “landshark” demo environment for Delphix Express. Landshark consists of two Linux Centos VMs that provide source and target examples for Delphix Express. I used the “target” VM but could have just as easily used the “source” machine.
Installing Jenkins
To install Jenkins I did:
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins
Then
service jenkins start
This gives the message “OK” but actually Jenkins dies. The workaround was to edit /etc/sysconfig/jenkins and change
JENKINS_AJP_PORT="8009"
to
JENKINS_AJP_PORT="8010"
also starting jenkins by hand worked even without workaround
cd /usr/lib/jenkins
java -jar jenkins.war
I then accessed the Jenkins console at http://my_linux_vm:8080
Running Jenkins
Click on “create new jobs”
Image may be NSFW.
Clik here to view.
Name the job
Select “Freestyle project”
Image may be NSFW.
Clik here to view.
Schedule the “date” command to be run and every 5 minutes by doing:
- Fill in “Build Triggers” by checking “Build periodically” and type in “H/5 * * * *”
- Under build choose “Execute Shell” and type in “echo `date`”
Image may be NSFW.
Clik here to view.
After hitting “Save”, then letting 5 minutes pass you’ll see a new entry in “Build History” in the bottom left. Click on the “#1″.
Image may be NSFW.
Clik here to view.
Then click “Console Output”
Image may be NSFW.
Clik here to view.
and you will see the output of the shell script we scheduled to be run every 5 minutes.
Image may be NSFW.
Clik here to view.
Delphix plugin
Delphix plugin is easy to add. Just navigate to “Manage Jenkins” in the top left
Image may be NSFW.
Clik here to view.
Then click on “Manage Plugins”
Image may be NSFW.
Clik here to view.
Then type in “delphix” in the search bar and then click on the “Delphix Jenkins plugin” to install
Image may be NSFW.
Clik here to view.
Now we can access Delphix APIs through the Jenkins interface. If I access a job (pick a job then click “configure” on the top left, or create a new job) and click “add build step” under build, you will now see Delphix command options:
Image may be NSFW.
Clik here to view.
Here is a zoom in to the new “Add build step” options:
Image may be NSFW.
Clik here to view.Before we can use these build steps, we have to add the Delphix engine(s) to Jenkins.
To add Delphix engine(s) click on “Manage Jenkins” on the top left
Image may be NSFW.
Clik here to view.
Then you should see a long page. In the middle of this page you should see a “Delphix” section
Image may be NSFW.
Clik here to view.
Add the Delphix engine(s) and hit “save” at the bottom of the screen
Image may be NSFW.
Clik here to view.Now when I add a build step I can choose a Delphix action like “add environment”
Image may be NSFW.
Clik here to view.and now I can click “run now” and it adds the environment