Introduction

What’s Jenkins? Jenkins is a automation tool. With it, you can create jobs to build, test and deploy your application.

Jenkins, docker and Pipeline

You can create your pipelines in jenkins. But, whats’s pipeline? Pipeline is a script step by step of all things that you need to do. Example: you will create a pipeline to build your code. First step is checkout your git code, after this you need test, build, package, create a docker image and finaly, deploy your code.

Creating Container

The fist steps with jenkins it’s create a container in your machine. You need docker installed and running in your machine. Execute this command:

docker run -—name jenkinsci -p 8080:8080 jenkins/jenkins:lts

This command will download and run a jenkins in your machine.

Wait a time, The console will show a lot of messages. When jenkins was inicialized, the console will show you a admin password to start jenkins initial setup. The text with password is:

*************************************************************
*************************************************************
*************************************************************
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:
a3c76c0cc3e541ff94b3670c22995342
This may also be found at: /var/jenkins_home/secrets/initialAdminPassword
*************************************************************
*************************************************************
*************************************************************

Jenkins instalation Wizard

You can access your jenkins in http://localhost:8080/. You will see this screen:

Jenkins unlock screen

Put the admin password in input on the screen and click on “continue”.

In next screen, click on “Install suggested plugins”.

Customize jenkins screen

Wait the plugins instalations.

Getting start screen. Downloading plugins

Now, create a user for you.

Create user screen

We finish the instalation, click on “Get start using Jenkins”.

Jenkins is ready

Startup Configuration

Let’s install two plugins:

  • blueocean plugin to beautify your jenkins. This plugin better the usability of jenkins and focus in pipelines scripts.
  • locale plugin to jenkins always show english text. You don’t need install this, but I suggest install to search errors directly in english.

Installing locale plugin

Go to Plugin Manager and search for locale.

To install plugins: In home of jenkins, click on Manage Jenkins:

jenkins menu

Click on Manage Plugins:

Manage Plugins link

In Plugin manager, you’ll need click on Available tab and after load the tab, search the plugins.

Tabs to search and manage plugins

Search for locale, mark the checkbox and click in install button.

locale plugin

Configuring locale

After install locale, go to Home > Manage Jenkins > Configure System.

Configure Jenkins

Search for locale. Input “en” on “Default language” and check “ignore browser preference and force this language to all users”

Locale configured

Installing blue ocean plugin

Locale Plugin installed and configured. Let’s install Blue ocean. Back to jenkins home > Manage jenkins > Manage Plugins. On Available tab search for blueocean and install it.

blueocean plugin

Changing visual to blue ocean

All done. But the visual it’s without blue ocean plugin, let’s use it. On Jenkins home, click on “Open Blue Ocean” (left menu).

jenkins menu with blue ocean

Now, you will see a screen like this:

Blue ocean

All Right, the jenkins is installed and the blue ocean plugin is being used to have a better experience in your pipelines.

The next steps is create a pipeline to build some things.