Posts

Showing posts from March, 2023

Create Freestyle job in Jenkins || Create build job in Jenkins to automate Java build and deployment of WAR into Tomcat

Image
Create Freestyle job in Jenkins || How to create build job in Jenkins to automate Java build and deployment of WAR into Tomcat Jenkins is popular open source Continuous integration tool. It was written entirely in Java. Jenkins is a self-contained automation server used for automating builds, tests and deployment. See below the steps for configuring Jenkins to automate the build and deployment for the Java project we already set up in GitHub. pre-requisites: Java Project is setup in GitHub or your SCM Jenkins is up and running Tomcat is up and running Make sure you  configure maven installation  under Jenkins-->manage Jenkins-> Global Tool Configuration. under maven installation. enter  Maven3  as name, enter path of maven installation -->  /usr/share/maven  and uncheck install automatically option. Also  install  deploy to container ,   Jacoco  plugins under Jenkins  --> Manage Jenkins --> Manage plug-ins Click on Available, type Deploy to container, select it. enter Ja

How to setup SSH keys || How to setup Repo in GitHub and Setup Java Project in GitHub || How to add a Java Web App in GitHub using Maven

Image
  GitHub is one of the popular git-based version control systems. GitHub is very good example for Software-as-a-service, hosted on cloud for storing and sharing code.  We will learn how to create a Java Project using Maven and push Java Project into GitHub from Ec2 instance. Let us learn how to create SSH keys and securely connect to gitHub from EC2 instance.  Git is a purely distributed version control system.  Pre-requisites: 1. GitHub account 2. Git client installed 3. Connect to your Jenkins EC2 instance Step # 1 - Create private repository in GitHub Go to  https://github.com/ Click on New to create a new repo  Also choose initialize with repository with a README option. Step # 2 Create SSH keys from your Jenkins EC2 machine Login to your Jenkins EC2 instance using Git bash.  ( make sure you are connected to Jenkins instance) make sure you are connected to EC2 instance  by ssh url.  Type  ssh-keygen  (and then click on enter four button times, do not give any password).  ssh-keygen