Posts

CI/CD as Code Part IV - Stateless Jenkins : Jobs as Code - Advanced

Image
In the previous article of these examples , we created a stateless jenkins container which can be initialised solely by using scripts. In that example, a seed job for jobdsl plugin was also implemented. This job was later on used to create an automated simple jenkins job inline. In order to create more complex jobs in an automated fashion, we will extend previous seed job implementation further in this example. Our extended seedJob will poll a job definition repository to gather the information on how to create new complex jobs for some other remote repositories.

Creating a Customised Mysql Docker Image Supported by Initialisation Scripts

Summary This blog post aims to provide an introduction to create a database container  with predefined data in it. Therefore, it does not address explanations of basic docker commands and instructions.  Containerisation has many advantages.  One advantage among these is getting up and running quickly with a production ready datasource, which has predefined data in it. This way we can share and use the application data state in local development environments easily. In this article we are going to create such a customised datasource container, in order to speed up our development activities. Even though, mysql is used as the database system in this blog post, similar concepts are applicable to other database systems as well. The steps that we're going to follow to reach our goal are as follows: Creating a Dockerfile for our base container Implementing the scripts for database/table creation and sample data insertion.  Building our customised mysql docker i...

Testing Java Projects with Groovy

This example demonstrates how we can implement our tests using groovy in a java based project. You might be asking why. Well, implementing tests with groovy has some advantages. However, this article does not try to convince you groovy is a better way to implement your tests. It's just another alternative to implement your tests. If you want to investigate testing java projects with groovy, the article will, then, provide you a starting point for your investigation.

Generating Rest API Documentation Using Rest Assured Tests in a Spring Boot Based Application

A clear and concise REST API documentation is mandatory for a rest api to be easily used. However, it's error prone and is also hard to maintain an api documentation if we attempt to write it manually. This sample project demonstrates how we can use rest assured tests to generate api documentation with a small amount of manual work. Project Setup This sample uses Spring Boot 2.x as its core framework. In order to achieve our goal it's also necessary to add some additional dependencies and configure some maven plugins.  These configuration needs and dependencies are explained step by step in the following subsections. You can also checkout initial setup for the demonstration using the link below: git clone --branch rest-assured-asciidoc_start git@github.com:entrofi/spring.git The final form of the demonstration can also be checked-out using: git clone --branch rest-assured-asciidoc_finish git@github.com:entrofi/spring.gi t Dependencies The dependencies neede...

Java 8 Interview Questions Compilation - Part I

Candidates might face platform specific questions in the interviews of different companies. This article is intended to serve as a starting point for java 8 related interview questions.  However, please note that, the best way to have a good command of technical platforms is to practice. With each major release of the language, java team releases important features. Let's us take a look at the most significant ones with java 8: Functional Programming Features; functional interfaces, lambda expressions Default and Static method in Intefaces  Stream API and bulk data operations, Concurrency API improvements; ConcurrentHashMap, CompletableFutures, improvements in executors Nashorn, Javascript Engine ... Among these features, we will focus on functional programming related ones and stream API in this article. Let's begin: Functional Programming Related Basic Features Interfaces Optional Functional Programming Related Basic Features What is a Lambda Express...