How Automation will simplify my job.

For me, the best part of a project is delivering! Those last couple of hours I spend preparing to make sure the customer is happy with the result. 30 minutes to check tests and see if they are covering everything, 1 hour to deploy the solution and finally another 30 minutes to verify if everything is running smoothly.

Well, of course this is wishful thinking, since most projects are not that perfect and you don’t control every aspect of it. On the other hand, their complexity requires multiple tasks to deliver.

So, try to imagine a one year project developed with agile methodologies, with deliveries every two weeks (26 to be precise), and on top of that, several components that need to be reviewed and prepared carefully.  If it’s a small team it can be even more complicated, consuming resources that can be used to work on release features or to ensure the code quality.

At Polarising we use two tools to complete these tasks: Jenkins and SonarQube. To better contextualize, here’s a brief description of what consists each tool:

Jenkins is used to automate all sorts of tasks related to building, testing, delivering and deploying software. It can have different environments for each configuration, like Java, Python, Angular, etc. SonarQube is a tool used to maintain the quality of the code, like bugs, tests coverage, unused code, etc.

Every time there is a commit of new code to the source repository, a “wake up” Jenkins web hook goes off. In an earlier stage, Jenkins will download the new code, install everything that it needs and starts to run unit tests to check if everything is working properly.

After all the tests were done with flying colors, SonarQube will proceed to its quality analysis, generating a full report on the quality of the code created, based in the acceptance criteria of the quality these phase can have an error or not.

The final stage of deployment is only executed if the code is from the main branch of development or delivery, and the code will be compiled and created a deployed of the same. If it is a mobile app it can be uploaded for Google Play or to the Apple Store. If the code is from a server it will be compiled into a docker image and published into a registry that will allow an easier update or system deployment.

If in any of these stages occurs an error, the process is stopped and an email alert is sent to the development team. This flow is just one of the possibilities, since there are other kinds of automation. Jenkins is a simple tool that has several plugins and many configurations that can simplify a Developer’s life.

If you are like me, you’ll prefer to spend time developing rather than deploying. Besides being boring, you can miss something you’ll possibly need further and have to redo everything: what a pain! With Jenkins you only have to do some configurations and have a file that will say what needs to be done, setting you free for other tasks like making sure everything will run perfectly and you do a job well done!

Tiago Simões
Polarising Consultant

Author profile

Leave a Comment

Your email address will not be published. Required fields are marked *