Jenkins automation server allows to automate the building and testing of software project. In this tutorial, we will see how can we automate the building and testing of a fictitious software project.
Suppose, you are developing a learning software named
abc. The source code of your
abc project is already located in git repository in
my-git.com machine and can be accessed via ssh protocol -
Your workflow for building your software is simple. First, you clone the git repository to your local machine, then manually invoke the build tools.
user@abc-01:~ # env GIT_SSH_COMMAND='ssh -i abc.key' git clone ssh://email@example.com/projects/abc.git Cloning into 'abc'... remote: Counting objects: 6, done. remote: Compressing objects: 100% (3/3), done. remote: Total 6 (delta 0), reused 0 (delta 0) Receiving objects: 100% (6/6), done. Checking connectivity... done. user@abc-01:~ # cd abc user@abc-01:~/abc # echo 'Invoke commands to build the software' ...
After several builds, you find that this workflow is error prone and time consuming. You decide to automate the build process. In the following steps - we will see how
Jenkins can help you with this task.